duplicity-talk
[Top][All Lists]
Advanced

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

Re: [Duplicity-talk] My Incremental and Full Scripts


From: Jon
Subject: Re: [Duplicity-talk] My Incremental and Full Scripts
Date: Thu, 27 Nov 2008 09:01:27 -0400
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

Hi Ken,

No problem, no rush. Just wanted to make sure I was in the right place so that when it did appear I would notice.

Thanks

Jon

Kenneth Loafman wrote:
Jon,

Not yet.  As with all things, life gets in the way.  I plan to do it
this weekend, so check back Monday or so.

...Ken

Jon wrote:
Hi,

Kenneth Loafman wrote:
I could set up a User Contributions page on the website if that would
help.  Plus, we could start distributing some of these as examples if
all agree.  It would help some new folks get started.
I went poking around for this section this morning but didn't see it. Am
I in the right place? [1]

[1] http://duplicity.nongnu.org/

Thanks

Jon

...Ken

Jon wrote:
This is great. We should start a repo of working scripts :)

Jon

Damon Timm wrote:
Let me throw mine into the mix as well -- have been working on it for
the last couple days and is my first foray into the realm of
duplicity.  Appreciate any input, of course:

http://blog.damontimm.com/bash-script-incremental-encrypted-backups-duplicity-amazon-s3/



Damon

On Mon, Nov 24, 2008 at 2:19 PM, Timothee Besset
<address@hidden> wrote:
While we're on the topic, I'll pimp my own wrapper too:

http://github.com/TTimo/dupinanny/

Pretty much same idea, automate incremental vs full, I set it up to
run
from cron on various systems. Has support for breaking down a backup
into several smaller ones, failed backups have to be restarted
completely, since I do full machine backups on a slow link, I wasn't
able to get a single full backup through without breaking things down
a bit.

TTimo

Jon wrote:
Hi All,

I'm not sure how useful this is, but since there seems to be repeated
questions about the best way to set up full and incremental
backups, I
thought I would post the scripts I use.

I'm not saying that my way is the best way, just that it is a way and
I've been using it for several months. I've done periodic test
restores and they always work, so I feel good about the setup.

I run two scripts: a full and an incremental script. I run the full
each  Sunday night at 11PM and the incremental every other night at
11pm.

I keep 14 days of backups, I backup Thunderbird's IMAP email, and my
backup server runs SSH on a non-standard port.

You'll need to change anything munged, localuser to be a local
user on
your machine, localmachine to your host name (optional),
admin.server.com to your own backup server, and probably the SSH port
(not required at all if you're running SSH on port 22). These scripts
logs all their actions as well as report the available disk space at
the end of the backups and emails the reports to me locally just for
good measure. I don't always notice if a backup report isn't present,
but I have become accustomed to getting the daily backup emails and I
notice if they're missing. The incremental also includes collection
status reports in the report.

Hope these are useful for someone.

Jon


Here's the full backup script (watch for wrap/formatting errors):

#!/bin/sh
# Export the PASSPHRASE variable
export PASSPHRASE=munged

# Get the date
repDate=`date +%Y%m%d`;

# Cleanup first (anything older than 21 days)
/usr/bin/duplicity remove-older-than 14D -v9 --force
scp://address@hidden:2035//backup

# Now do the backup
/usr/bin/duplicity full --include /home/localuser/Documents --include
/home/localuser/.mozilla-thunderbird/01pvkqct.default/ImapMail/mail.messagingengine.com


--include /home/localuser/scripts --exclude '**' /home/localuser/
scp://address@hidden:2035//backup/localmachine --sign-key
MUNGED >
/home/localuser/Documents/BackupLogs/Full_Backup_Log_$repDate_localmachine_admin.log




# Get the disk space
echo "Availble Disk Space on Server" >>
/home/localuser/Documents/BackupLogs/Full_Backup_Log_$repDate_localmachine_admin.log



echo >>
/home/localuser/Documents/BackupLogs/Full_Backup_Log_$repDate_localmachine_admin.log



/usr/bin/ssh -p2035 address@hidden df -h >>
/home/localuser/Documents/BackupLogs/Full_Backup_Log_$repDate_localmachine_admin.log




# Mail me the results
mail -t localuser -s "localmachine Backup Full (Admin)" <
/home/localuser/Documents/BackupLogs/Full_Backup_Log_$repDate_localmachine_admin.log




And the incremental script (same

#!/bin/sh
# Export the PASSPHRASE variable
export PASSPHRASE=munged

# Get the date
repDate=`date +%Y%m%d`;

# Cleanup first (anything older than 21 days)
/usr/bin/duplicity remove-older-than 14D -v9 --force
scp://address@hidden:2035//backup/localmachine

# Now do the backup
/usr/bin/duplicity --include /home/localuser/Documents --include
/home/localuser/.mozilla-thunderbird/01pvkqct.default/ImapMail/mail.messagingengine.com


--include /home/localuser/scripts --exclude '**' /home/localuser/
scp://address@hidden:2035//backup/localmachine --sign-key
MUNGED >
/home/localuser/Documents/BackupLogs/Incremental_Backup_Log_${repDate}_localmachine_admin.log




# Get list of backups
/usr/bin/duplicity collection-status
scp://address@hidden:2035//backup/localmachine >>
/home/localuser/Documents/BackupLogs/Incremental_Backup_Log_${repDate}_localmachine_admin.log




# Get the disk space
echo "\nAvailble Disk Space on Server" >>
/home/localuser/Documents/BackupLogs/Incremental_Backup_Log_${repDate}_localmachine_admin.log



echo >>
/home/localuser/Documents/BackupLogs/Incremental_Backup_Log_${repDate}_localmachine_admin.log



/usr/bin/ssh -p2035 address@hidden df -h >>
/home/localuser/Documents/BackupLogs/Incremental_Backup_Log_${repDate}_localmachine_admin.log




# Mail me the results
mail -t localuser -s "localmachine Backup Incremental (Admin)" <
/home/localuser/Documents/BackupLogs/Incremental_Backup_Log_${repDate}_localmachine_admin.log






_______________________________________________
Duplicity-talk mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/duplicity-talk
_______________________________________________
Duplicity-talk mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/duplicity-talk

_______________________________________________
Duplicity-talk mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/duplicity-talk
_______________________________________________
Duplicity-talk mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/duplicity-talk



------------------------------------------------------------------------

_______________________________________________
Duplicity-talk mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/duplicity-talk

_______________________________________________
Duplicity-talk mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/duplicity-talk




------------------------------------------------------------------------

_______________________________________________
Duplicity-talk mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/duplicity-talk




reply via email to

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