How to backup site to my computer

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.

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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

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
  • Snapshots

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 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@ /local/directory

you need to change the username and the IP address. To scp to a different port use:

scp -P 2222 -r username@ /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@ /local/directory

To use rsync on different port:

rsync -avz -e "ssh -p $portNumber" user@ /local/path/

Now, you need to find where your Magento is stored as well and copy the files from there to your local machine.