How to downgrade Digital Ocean Droplet

STEP1: Move mysql directory to a volume (do it as root user):

  • Create a new volume.
  • Attach it to current droplet.
  • SSH into your server
  • Make yourself root
  • Make sure it’s properly mounted and resized
  • Put Laravel app into maintenance mode
  • Stop mysql service (to allow for data consistency)
  • Make database backup (for safety, you can delete it later)
  • Move mysql folder to new volume
  • Create a symbolic link to this folder
  • Configure AppArmor Access
  • Restart AppArmor
  • Start MySQL Service
  • Make app up again

STEP2: Attach volume to new droplet (do it as root user):

  • SSH into your server -Make yourself root
  • Make sure volume is properly mounted and resized
  • Put Laravel app into maintenance mode
  • Stop mysql service (to allow for data consistency)
  • Rename mysql folder to mysql_backup
  • Create a symbolic link to this folder
  • Configure AppArmor Access
  • Restart AppArmor
  • systemctl restart apparmor -Start MySQL Service
  • systemctl start mysql -> systemctl status mysql -Make app up again

STEP 3 [OPTIONAL]: Transfer your logs to S3 Spaces:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store