Skip to content

Instantly share code, notes, and snippets.

View miwgel's full-sized avatar
🎯
Focusing

Miguel B. miwgel

🎯
Focusing
View GitHub Profile
@amalmurali47
amalmurali47 / backup_digitalocean.md
Last active June 18, 2024 15:53
Backup DigitalOcean droplet locally

DigitalOcean does not provide a way to download a snapshot of your droplet locally. You can use rsync to accomplish this instead.

On your local machine, assuming you have added your-server in your SSH config:

rsync -aAXHv --append-verify --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} your-server:/
  • -a : archive mode (all files, with permissions, etc.)
  • -A : preserve ACLs/permissions (not included with -a)