Python module to manage Digitalocean droplet backups.
Project description
## Synopsis:
This module works with [python-digitalocean](https://github.com/koalalorenzo/python-digitalocean) to allow you to rsync and snapshot your droplets with ease. **Great for hourly cron jobs!**
###### Works with posix (*nix, osx, cygwin)
Tested with Python 2.7.8(CYGWIN), 2.7.9(OS X/Linux), 3.4.3(OS X/Linux)
## How to install:
via pip
pip install -U python-digitalocean-backup
via source
python setup.py install
##### PyPI package
[https://pypi.python.org/pypi/python-digitalocean-backup](https://pypi.python.org/pypi/python-digitalocean-backup)
##### Example backup script (backup.py):
```python
from 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
)
```
##### Example hourly cron job:
```sh
0 * * * * /usr/bin/python /Users/username/bin/backup.py
```
###### Requires:
[python-digitalocean>=1.5](https://github.com/koalalorenzo/python-digitalocean)
This module works with [python-digitalocean](https://github.com/koalalorenzo/python-digitalocean) to allow you to rsync and snapshot your droplets with ease. **Great for hourly cron jobs!**
###### Works with posix (*nix, osx, cygwin)
Tested with Python 2.7.8(CYGWIN), 2.7.9(OS X/Linux), 3.4.3(OS X/Linux)
## How to install:
via pip
pip install -U python-digitalocean-backup
via source
python setup.py install
##### PyPI package
[https://pypi.python.org/pypi/python-digitalocean-backup](https://pypi.python.org/pypi/python-digitalocean-backup)
##### Example backup script (backup.py):
```python
from 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
)
```
##### Example hourly cron job:
```sh
0 * * * * /usr/bin/python /Users/username/bin/backup.py
```
###### Requires:
[python-digitalocean>=1.5](https://github.com/koalalorenzo/python-digitalocean)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for python-digitalocean-backup-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4bc746b3108b83442bde5be715f53808160d1c2358a95c3ae39887ecf2bcb73 |
|
MD5 | 1e35f0e7891f0e5a3048c9258df32320 |
|
BLAKE2b-256 | fdbffcd043ead0625836fde7219dd9f170f4a0b04f828c9d932b8e87578b6013 |