|
From: | Dan Parrish |
Subject: | Re: [Duplicity-talk] --remove-older-than: what obvious thing am I missing? |
Date: | Sun, 23 Jan 2005 12:16:54 -0700 |
User-agent: | Mozilla Thunderbird 1.0 (X11/20041208) |
Eric Hanchrow wrote:
I've use this script to do periodic unattended backups to a couple of remote hosts to which I've got ssh access. #!/bin/sh # Is today Sunday? if test `date +%w` = 0; then howmuch=--full else howmuch=--incremental fi for host in one.host.com another.host.net etc.you.get.the.picture do echo $host ... duplicity \ $howmuch \ --remove-older-than $(date +%s --date='last week') \ --include $HOME/one-important-directory \ --include $HOME/another-important-directory \ --exclude '**' \ $HOME \ scp://$host/dups done It seems to work fine (i.e., the "dups" directories on those hosts are filling up nicely with impressive-looking backup files) except for one thing: those backup files never get deleted. I'd thought that by specifying --remove-older-than, files older than a week would get pruned, but it ain't happening. Am I misunderstanding something? This is version 0.4.1-8 on Debian Sarge (aka "Testing").
When I use the "--remove-older-than 10D" switch, this is what the output says:
There are backup set(s) at time(s): Sun Dec 12 20:06:02 2004 Mon Dec 13 04:53:01 2004 Tue Dec 14 04:53:01 2004 Wed Dec 15 04:53:01 2004 Thu Dec 16 04:53:01 2004 Fri Dec 17 04:53:01 2004 Sat Dec 18 04:53:01 2004 Sun Dec 19 04:53:01 2004 Mon Dec 20 04:53:01 2004 Tue Dec 21 04:53:01 2004 Wed Dec 22 04:53:01 2004 Thu Dec 23 04:53:01 2004 Sat Dec 25 04:53:02 2004 Sun Dec 26 04:53:01 2004 Mon Dec 27 04:53:01 2004 Tue Dec 28 04:53:02 2004 Wed Dec 29 04:53:01 2004 Thu Dec 30 04:53:01 2004 Fri Dec 31 04:53:01 2004 Sat Jan 1 04:53:01 2005 Sun Jan 2 04:53:01 2005 Mon Jan 3 04:53:01 2005 Tue Jan 4 04:53:01 2005 Wed Jan 5 04:53:01 2005 Thu Jan 6 04:53:01 2005 Fri Jan 7 04:53:01 2005 Sat Jan 8 04:53:01 2005 Mon Jan 10 04:53:01 2005 Tue Jan 11 04:53:01 2005 Wed Jan 12 04:53:01 2005 Which can't be deleted because newer sets depend on them. No old backup sets found, nothing deleted.IOW, it doesn't prune like rdiff-backup does. rdiff-backup keeps a current full copy and reverse diffs going back in time, while duplicity STARTS with a full backup and tracks the changes along the way. Because of the way it tracks the changes, it can't prune the older tarballs. I haven't figured out a way around this...There might be one, but I haven't read about it in my (admittedly light) reading of the man page and such.
As I figure it, your backup directory continues to get larger and larger over time, until you make a completely new backup ***OR*** you delete all increments since the last full backup and start building new incrementals.
Anyone else got this figured out? I really liked how rdiff-backup handles everything...It's just not encrypted.
-Dan
[Prev in Thread] | Current Thread | [Next in Thread] |