Created
March 21, 2012 02:00
-
-
Save robraux/2143639 to your computer and use it in GitHub Desktop.
Example of using Duplicity in Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#1 Install it (example of linking to RackSpace Cloud), ubuntu example | |
apt-get install duplicity | |
apt-get install python-setuptools | |
git clone git://github.com/rackspace/python-cloudfiles.git | |
python setup.py install | |
#2 Create a simple shell script (put this in a shell script) | |
export CLOUDFILES_USERNAME=YOURNAME | |
export CLOUDFILES_APIKEY=YOURKEY | |
# no encryption, 100mb file, retry volume sync 5 times just in case of timeouts (it's the cloud after all) | |
duplicity --no-encryption --volsize 100 --num-retries=5 /var/www/dir cf+http://bucket_name | |
# cron it up (example runs at 10:02 am and 11:02 pm | |
root@domU-12-51-39-10-2C-91:~/backup/scripts/production# crontab -l | |
# m h dom mon dow command | |
2 10,23 * * * cd /root/backup/scripts/production && zsh master.sh | |
#3 Make sure it's working damn it! | |
duplicity collection-status cf+http://bucket_name | |
# or list files... | |
duplicity list-current-file cf+http://bucket_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment