How do I backup my site to my local computer hard drive?

May 6, 2016 2.8k views

Hey guys,

Source of website: Digital Ocean droplet
To back up my contents and database (basically the entire web app).

Thanks in advanced!

p.s. couldn’t find any sources online but backup to another server / hosting provider

  • Is your local computer running Windows, OS X or Linux? If you are on a Mac or running Linux this is pretty straightforward. On windows it will likely require some third party (free) software.

  • Hey, thanks.
    I’m running mac

2 Answers

I used to use Cobian Backup in my Windows Days (several years ago)…looks like it is still active, and had lots of nice features like recursive backups, scheduler, etc. also could be installed as a service.

But for Linux or Macs: rsync <learn it, use it, love it.

In a Linux terminal, I run ssh root@IP_ADDRESS "dd if=/dev/vda1 | gzip -1 -" | dd of=~/DOimage.gz status=progress. Works a treat.

  • That is a good answer, but in case the person needs to restore the drive to the remote machine, it’s not necessarily clear to everyone how to reverse the process.

    gunzip -c ~/DOimage.gz | ssh root@IP_ADDRESS “dd of=/dev/vda1”

    I’m pretty sure that will work. I’m not testing it at the moment though.

Have another answer? Share your knowledge.