duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Duplicity-talk] Using the cloud for backups between backups to an exter


From: lists
Subject: [Duplicity-talk] Using the cloud for backups between backups to an external HDD
Date: Sat, 22 Sep 2012 14:47:54 +0100
User-agent: Roundcube Webmail/0.7.2

Hello all,

I currently use a couple of external HDDs to back up my personal files, which I keep at work. I have always been concerned about losing data if something happened in between the times that I bring home a hard drive for a backup. Backing up to the cloud always appealed for this reason, but I wasn't prepared to pay to store my TB of backups in the cloud.

I came up with the following solution, which I thought may help others. In essence I am still primarily backing up to my external HDDs, but am backing up to the cloud in between those HDD backups. That way, if anything happened between backups, I could supplement the external HDD files with those from the cloud and have an up-to-date backup. As it happens, I do duply backups to a local HDD first (because I have the space) and then rsync it to the external HDDs or, in this case, Ubuntu One.

1) Record the date/time after every backup. I have a script that I run whenever I plug in my external HDD that runs all my duply backups and then rsyncs them to the HDD. I added the following line to the end of that script: date +"%Y%m%d %H:%M:%S" > ~/Backup/duplicity-scripts/passport-lastrun.txt

2) Install Ubuntu One. That will then keep the ~/Ubuntu One/ folder in sync with the cloud.

3) I created a daily cron job that runs a bash script. That bash script first runs the duply backups and then does the following:
# Backup any new duply backups since the last HDD backup
find ~/Backup/duply_backups/ -newermt "`cat ~/Backup/duplicity-scripts/passport-lastrun.txt`" | rsync -a --delete --files-from=- / ~/Ubuntu\ One/Backup/duply/

# Delete anything there that is older than the last HDD backup (rsync doesn't delete files in the target location if you are using a file list) find ~/Ubuntu\ One/Backup/duply/ -not -newermt "`cat ~/Backup/duplicity-scripts/passport-lastrun.txt`" -exec rm {} \;

Hope that helps the next person who wants to do the same.

Regards,

Aaron



reply via email to

[Prev in Thread] Current Thread [Next in Thread]