

Along with them you also need to enter the MySQL password (if any) when prompted. Sudo mysqldump -u mysql_username -p database_name > database-backup.sqlīefore running this command, make sure you change mysql_username and database_name you need to back up. To back up your database, run the below command with required changes. We’ll back up the entire database as an SQL file which can be used to restore again if needed. Still, we need to back up the database to complete the process. We have successfully downloaded your entire website files and saved it on the local machine. Run the below command to delete the backup file from the server. Your backup will be saved with name files-backup.zip and you can download the backup file by opening Step 5:įor security reasons, you should delete the zip file immediately after downloading the zip file. Sudo zip -r /var/www/html/files-backup.zip /var/www/html/ Don’t panic and stay calm until it does its work It would take 2-10 minutes to zip your entire site depending on the size of files. It’s time to take the actual backup by running the following command.

Run the following commands to install zip utility. Ignore this step if zip utility is already installed and proceed to step 4. In this step, we’re installing a utility to zip the files. You need to follow this step only when you’re taking backup for the first time.

Navigate to /var/www/html directory using the command cd /var/www/html

If my site is taken down and locked access to the droplet, then what is the use of backups in my droplet? What if they permanently disable the account and refuses to provide backup? Our entire business will go down in split second and irony is we’ll never know why our droplet is taken down and how our business died. DigitalOcean users response in recent days Support of DigitalOcean is poor as everyone knows and we need to wait for hours just to get a reply for our ticket. For some reasons, DigitalOcean guys are taking down the production sites and locking access to droplets without any warning or notice. Still, it is better to lose 7 days of data instead of losing my entire site.Įverything is going normally until I see a lot of updates on Facebook where people complain about DigitalOcean’s strange behavior. The downside is DigitalOcean will take a backup for every 7 days and in the worst case, I’ll lose my 7 days data. To be on safer side I enabled backups option for my droplet which cost me extra $2/month. When Geek Dashboard is running on shared hosting, I make use of the backup wizard in cPanel and take the regular backups which are not possible with DigitalOcean.
