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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
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:
scp -r username@10.10.0.1:/remote/directory/ /local/directory
you need to change the username and the IP address. To scp to a different port use:
scp -P 2222 -r username@10.10.0.1:/remote/directory/ /local/directory
Like scp, rsync is used to copy files either to or from a remote host, or locally on the current host.
rsync -avz user@10.10.0.1:/remote/directory/new_image.png /local/directory
To use rsync on different port:
rsync -avz -e "ssh -p $portNumber" user@10.10.0.1:/path/to/files/ /local/path/
Now, you need to find where your Magento is stored as well and copy the files from there to your local machine.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.