How to backup droplet/whole server to my own storage?

August 9, 2018 11.1k views
Backups Ubuntu 18.04

Hello, I’m aware that DO offer snapshots and backups. But are still stored by DO. I would also would like to be able to store my own backup.

What’s the best solution to backup my whole (ubuntu) droplet, for example save to my own NAS? Ideally it would be incremental as a snapshot. A solution that could restore the droplet.

Thanks for any advice.

2 Answers

Hello friend!

Excellent question. While external backups cannot be as easily restored as our snapshots/backups, you should always keep copies of your data off site just in case.

Personally I would use rsync, and I have a guide for that:
https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories-on-a-vps

There are easily hundreds of ways to go about this, if not more, but rsync is always a favorite of mine for it’s excessive simplicity. Honestly, a raspberry pi hooked up to an external drive sitting on a shelf in the house could do this for you. Set a cron job and let it do it’s thing :)

Kind Regards,
Jarland

by Justin Ellingwood
Rsync is a simple tool for intelligently syncing local and remote directories. In this article we will explore the basic usage of this utility to copy files from directory to directory and from system to system.
by Paul White
Luckily there is a way to mount your VPS file system to your local computer so you can make changes on the fly and treat your droplet as local storage.
  • This doesn’t appear to work; sshfs attaches to a filesystem, but dd needs a block device (which is what we’re trying to copy; the first answer, with rsync, works fine for copying file structures).

    Trying to follow the dd instructions gives this error: “dd: error reading ’/mnt/droplet’: Is a directory”

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!