BackupPC-users

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

2009-08-28 12:49:40
Subject: Re: [BackupPC-users] Feature request: preserve (from deletion) individual backups by number
From: sipa AT users.sourceforge DOT net
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Fri, 28 Aug 2009 18:27:31 +0200
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.

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.

-- 
Pieter


------------------------------------------------------------------------------
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/