[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ANN: tarsnapper
Excerpts from Michael Elsdörfer's message of 2010-08-28 15:45:47 +0200:
> I'd like to let everybody know about a small wrapper around tarsnap that
> I've written:
>
> http://github.com/miracle2k/tarsnapper
>
> The main thing I needed was something like a grandfather-father-son
> scheme to expire backups, but without encoding the backup type in the
> filename, and without having any expectations about when the backup
> script runs or has run in the past.
>
> Instead I tried to come up with an approach which, given a list of
> backups and a list of deltas, tries to delete old backups while matching
> the requested deltas as closely as possible.
>
> I've been using it on both my desktop and a server for the last two
> months, and it seems to work very well.
>
> To help me define my backups, the script can also load a list of backup
> jobs from a YAML file.
>
> Michael
Hi Michael,
this looks really useful, thank you for sharing this. I do have a problem
though: when I try to create a new backup I get the following error
a ~$sudo tarsnapper --target t42-home-etc-\$date --sources /home/a/ /etc/ --deltas 1d 30d 360d - make
Creating backup: t42-home-etc-20100830-123206
Traceback (most recent call last):
File "/usr/bin/tarsnapper", line 8, in <module>
load_entry_point('tarsnapper==0.1', 'console_scripts', 'tarsnapper')()
File "/usr/lib/python2.6/site-packages/tarsnapper/script.py", line 449, in run
sys.exit(main(sys.argv[1:]) or 0)
File "/usr/lib/python2.6/site-packages/tarsnapper/script.py", line 442, in main
command.run(job)
File "/usr/lib/python2.6/site-packages/tarsnapper/script.py", line 308, in run
self.expire(job)
File "/usr/lib/python2.6/site-packages/tarsnapper/script.py", line 236, in expire
self.backend.expire(job)
File "/usr/lib/python2.6/site-packages/tarsnapper/script.py", line 115, in expire
backups = self.get_backups(job)
File "/usr/lib/python2.6/site-packages/tarsnapper/script.py", line 102, in get_backups
date = parse_date(match.groupdict()['date'], job.dateformat)
File "/usr/lib/python2.6/site-packages/tarsnapper/script.py", line 170, in parse_date
raise ValueError('"%s" is not a supported date format' % string)
ValueError: "no-recurse-10-07-22-22:02" is not a supported date format
It seems tarsnapper does not like the date format that I have used for some
older snapshots in the same account ("no-recurse-10-07-22-22:02" is the name of
snapshot). One solution would be to delete all old snapshots I guess and only
use tarsnappers date format in the future, but it is probably better to change
tarsnapper so it doesn't choke on the names of unrelated backups.
--