[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ANN: tarsnapper
- To: tarsnap-users <tarsnap-users@tarsnap.com>
- Subject: Re: ANN: tarsnapper
- From: Arian Kuschki <arian.kuschki@googlemail.com>
- Date: Mon, 30 Aug 2010 14:54:27 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=content-type:from:to:subject:in-reply-to:references:date:message-id :user-agent:content-transfer-encoding; b=XlvOkbKiv1xdID26RNTWG30vl6AOjUK5BpTX0TryrKrgqQl5WC0ZJFTrMnjIQlDdsr yDOoYTRWOe0zgudg1uURlmSDIJCFPr/QhSl40mbUuOWRXcpUO9etozynbHcbGcCCNqMN j+AIott8RRTgoytFPCZs3cDiiT+Kuc9eiuY28=
- In-reply-to: <1283172189-sup-2656@localhost.localdomain>
- Mailing-list: contact tarsnap-users-help@tarsnap.com; run by ezmlm
- References: <4C79130B.3030105@elsdoerfer.com> <1283172189-sup-2656@localhost.localdomain>
Excerpts from Arian Kuschki's message of 2010-08-30 14:49:37 +0200:
> 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
Actually, the name of the old snapshot is
"t42-home-etc-no-recurse-10-07-25-20:41", so the reason tarsnapper chokes
is because the first part (t42-home-etc-) is the same as in the new
snapshot and it tries to parse the remainder as a date. Still, it would
probably better to just warn in case of an error like this and not
abort I think.
> 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.
>
--