BackupPC-users

Re: [BackupPC-users] Strict backup schedule

2010-01-27 01:49:41
Subject: Re: [BackupPC-users] Strict backup schedule
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: Wed, 27 Jan 2010 01:47:38 -0500
Adam Goryachev wrote at about 12:40:34 +1100 on Wednesday, January 27, 2010:
 > Gerald Brandt wrote:
 > > I'm having problems with expiry though.  Take this months for example. 
 > > I'll have 5 full backups on January 1, 8, 15, 22, 29.  The 29th will
 > > also be the monthly backup. Then February will be 5, 12, 19, 26, with
 > > the 26 being month end.   I usually keep the weeklies until the
 > > monthlies are done.  So, on Jan 26, I'll want to delete the Jan 1, 8,
 > > 15, and 22 fulls.  On Feb 26, I'll want to delete the 5, 12, and 19
 > > fulls.  March becomes a new issue.  When I do the Mar 31 backup, I'll
 > > need to delete Mar 5, 12, 19 and 26 fulls. 
 > 
 > Why expire all of January in the first week of February? That means you
 > only have one weeks history? Why not just tell backuppc to keep 5
 > 'weekly' fulls, which means you will always have the ones you want?
 > 
 > > I found a delete script that can do the deletes for me, but is that the
 > > only way?  I'd hate to have to parse output to figure out what to delete.
 > 
 > Yes, this is the hard part. Sooner or later you will probably need to
 > find a way to expire a specific backup number. I don't think this will
 > really work otherwise.
 > 
 > Personally, I don't like this solution either...
 > 
 > > BackupPC isn't meant designed to do this stuff, so I may have to script
 > > the whole process.  Ugh.  My perl "ain't so good".
 > 
 > Nope, it isn't... I don't think there is a 'proper' way to delete a
 > specific backup either, but it would definitely require a bit of
 > scripting, and making sure you don't 'mess it up' under any circumstance
 > is harder.
 > 
 > So far, I have used two variations:
 > 1) Use the supported keep values (with various values)
 > 2) Keep everything for ever. (Use excessively high keep values to cover
 > at least 10000 backups).
 > 
 > I think your main issue is that backuppc can't use block level
 > de-duplication. If it could, you could store all your daily SQL backups
 > with minimal actual storage space consumption. Of course, this would
 > come in handy for plenty of others too :)
 > 
 > Maybe someone else will have something more helpful to add.
 > 

Deleting full backups (or fulls plus all the incrementals that depend
on it) is not very hard to do and shouldn't cause issues. You really
just need to do a "rm -rf" on the relevant backup numbers and then do
some trivial readjustment to the 'backups' file that tracks the
backups.

Re the OP's statement about "My Perl ain't that good", the script is
so simple it can easily be done in bash. In fact,   Matthias Meyer has
written just such a script which I believe is posted on the Wikki.

So, you could use option #2 to keep all backups and the write/modify a
bash script to trim the saved backups on a regular basis. Of course,
if you are happy with the internal exponential expiry approach then
you don't need any third party script.

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
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/