duplicity-talk
[Top][All Lists]
Advanced

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

Re: [Duplicity-talk] [newbie] backup nesting filetrees?


From: Tom Roche
Subject: Re: [Duplicity-talk] [newbie] backup nesting filetrees?
Date: Thu, 13 May 2010 15:13:30 -0400
User-agent: GNU Emacs 23.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.0)

Tom Roche Wed, 12 May 2010 22:58:18 -0400
>> `duplicity` is tar-ing and compressing, not just mirroring, so I'm
>> suspecting the above [rsync-based] strategy just won't work. I.e. I
>> can't have one `duplicity` backup nested within another. Is that
>> correct? If so, I'm suspecting the most, umm, "duplicitous" way to
>> capture regular changes in a subspace is just to backup the whole
>> space, e.g.

>> * daily:  incremental backup of /home/me
>> * weekly: full backup of /home/me

David Rea Thu, 13 May 2010 00:46:45 -0400
> The simplest way to do this with Duplicity would seem to be to have
> a single backup job covering your entire home directory, running at
> your higher desired frequency (daily).

I guessed.

> The only thing I'd add is a weekly pruning step along with (err,
> immediately following) the weekly backup. You can use
> "remove-older-than" in a forced duplicity run to do this by date, or
> "remove-all-but-n-full" to do it by count.

So I can implement the two constraints

1 full backup weekly
2 prune (say) monthly

with something like the following (adapted from the ubuntu howto

https://help.ubuntu.com/community/DuplicityBackupHowto

but backing up only my /home, to an external drive):

export PASSPHRASE="..."
BACKUP_SOURCE_ROOT="${HOME}"
BACKUP_TARGET_ROOT="/media/HD/$(hostname)${BACKUP_SOURCE_ROOT}"
DUPLICITY_TARGET_ROOT="file://${BACKUP_TARGET_ROOT}"
BACKUP_OPTIONS="--full-if-older-than 1W"
PRUNE_OPTIONS="remove-older-than 1M --force"

# TODO: test readability of ${BACKUP_SOURCE_ROOT}
# TODO: test writability of ${BACKUP_TARGET_ROOT}
for CMD in \
  "mkdir -p ${BACKUP_TARGET_ROOT}" \
  "du -hs ${BACKUP_SOURCE_ROOT}/ 2> /dev/null" \
  "find ${BACKUP_SOURCE_ROOT}/ 2> /dev/null | wc -l" \
  "duplicity ${BACKUP_OPTIONS} ${BACKUP_SOURCE_ROOT} ${DUPLICITY_TARGET_ROOT}" \
  "duplicity ${PRUNE_OPTIONS} ${DUPLICITY_TARGET_ROOT}" \
  "du -hs ${BACKUP_TARGET_ROOT}/ 2> /dev/null" \
  "duplicity list-current-files ${DUPLICITY_TARGET_ROOT} | wc -l" \
; do
  echo -e "\$ ${CMD}"
  eval "${CMD}"
done
unset PASSPHRASE

Correct? Alternatively, is there a better way to implement those
constraints?

TIA, Tom Roche <address@hidden>



reply via email to

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