I don’t have any coding knowledge. Developer set up my Magento site here. I would like to back up database and all coding files to my computer. I would like to have back up in case something happens and database or coding files are lost on hosting.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello there,
You cannot currently download DigitalOcean backups or snapshots however, as an alternative, you can back up data locally using third-party tools like rsync or SFTP.
How To Use Rsync to Sync Local and Remote Directories
How To Use Filezilla to Transfer and Manage Files Securely on your VPS
To Export a database, open up a terminal, making sure that you are not logged into MySQL and type:
mysqldump -u [username] -p [database name] > [database name].sql
The database that you selected in the command will now be exported to your droplet.
To share your support for this feature, vote for downloading snapshots and backups on ideas.digitalocean.com.
Hope that this helps! Regards, Alex
Hi @rajb,
Before letting you know how you can backup your website locally, I’ll recommend using the DigitalOcean backup solution, it’s just for such cases. There are two types:
Backups: Backups are automatically-created disk images of Droplets. Enabling backups for Droplets enables system-level backups at weekly intervals, which provides a way to revert to an older state or create new Droplets.
You can read more about them here :
Snapshots:
Snapshots are on-demand disk images of DigitalOcean Droplets and volumes saved to your account. Use them to create new Droplets and volumes with the same contents.
You can read more about them here:
In your case, maybe the Snapshots is the better option.
Anyway, to download your website over locally, you’ll need to have SSH connection. Maybe if you are on Windows, you can use Putty.
To transfer a file from a remote machine to your local machine, run the following command:
you need to change the username and the IP address. To scp to a different port use:
Like scp, rsync is used to copy files either to or from a remote host, or locally on the current host.
To use rsync on different port:
Now, you need to find where your Magento is stored as well and copy the files from there to your local machine.