This module works with python-digitalocean to allow you to rsync and snapshot your droplets with ease. Great for hourly cron jobs!
Tested with Python 2.7.8(CYGWIN), 2.7.9(OS X/Linux), 3.4.3(OS X/Linux)
via pip
pip install -U python-digitalocean-backup
via source
python setup.py install
[digitalocean]
token = YOUR_DIGITALOCEAN_TOKENfrom digitaloceanbackup import *
for droplet in DigitalOcean().droplets:
Backup(
droplet=droplet,
ssh_user="root",
ssh_key="do_rsa",
remote_dirs=['/home', '/var/log', '/var/www'],
rsync_excludes=['cache', '.DS_Store', 'man3'],
snapshot_hour=2,
keep_snapshots=7,
debug=False
)0 * * * * /usr/bin/python /Users/username/bin/backup.py