BackupPC-users

Re: [BackupPC-users] Feature request: preserve (from deletion) individual backups by number

2009-08-28 13:30:59
Subject: Re: [BackupPC-users] Feature request: preserve (from deletion) individual backups by number
From: "Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Fri, 28 Aug 2009 13:26:06 -0400
sipa AT users.sourceforge DOT net wrote at about 18:27:31 +0200 on Friday, 
August 28, 2009:
 > On Fri, Aug 28, 2009 at 11:47:41AM -0400, Jeffrey J. Kosowsky wrote:
 > > In general, using FullKeepCnt and IncrKeepCnt (and associated
 > > variables) works well to prune older backups.
 > > 
 > > But sometimes there is a *specific* older backup that you want to hang
 > > onto because it has some crucial data (or is a 'better' snapshot). It
 > > would be great if you could tell BackupPC to keep an arbitrary list of
 > > numbered backups for each different host. (If any of the listed backups
 > > are incrementals, then BackupPC would of course be smart enough to
 > > save the relevant precedent incrementals and full backups).
 > > 
 > > For example I could imagine, a perl hash of arrays of the following
 > > form:
 > > 
 > > $Conf{PreserveBackups} = {
 > >            "hostA" => [ '23', '354', '798' ],
 > >            "hostB" => [ '3', '25', '37', '101' ],
 > >            "hostC" => [ '9', '11', '33', '434' ],
 > >            };
 > > 
 > > Does this make sense?
 > 
 > I would rather simply have a $Conf{PreserveBackups} = [ 23, 354, 798 ];
 > setting. Settings are already evaluated per-host, so this would allow you
 > to override it in the host-specific configuration, like many other settings.
 >

This would be potentially dangerous and confusing since generally
backup numbers are not related across hosts -- and hence the variable
would be in a sense meaningless if used in a standard config file. I
would be worried about the side effects of someone not realizing
that. If for some reason you wanted to literally keep the same backups
on all hosts then you could use the "*" notation.
 
 > Furthermore, this is already possible, albeit in a more manual way; eg. do
 > cp -rl /var/lib/backuppc/pc/hostA/23 /var/lib/backuppc/pc/hostA/kept-23
 > (i believe backuppc will not touch any directories there that aren't
 > completely numeric and/or listed in the backups files, if not, you should 
 > copy it to someplace outside of the pc/ directory).
 > 
 > The kept-23 directory will survive the removal of the 23 directory, and as a
 > consequence, the files won't be removed from the pool either.

True - but then you are doing a kludge outside of backuppc. Also,
this would not work for incrementals, unless you were careful to do
the same copy operation for each of its antecedents. Finally, these
backups would not show up in the web interface and would require
manual fiddling in order to restore. So yes, technically, it would
prevent the files from being deleted, but it is at best a poor
workaround.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/