BackupPC-users

[BackupPC-users] Solution to keeping files selectively by "age" of backups

2008-11-23 05:02:31
Subject: [BackupPC-users] Solution to keeping files selectively by "age" of backups
From: "Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org>
To: <backuppc-users AT lists.sourceforge DOT net>
Date: Sun, 23 Nov 2008 05:00:01 -0500
Several people have recently asked about whether it is possible to
have some files backed up only occasionally or to keep some files for
only a limited amount of time.

One example is perhaps you want to always have the most recent couple
of backups of your temp files so that if something crashes you can do
a full restore but you don't want to save these files (nearly)
forever.  So, for example maybe you want the ability to have some
files only saved for the last 'x' backups.

Well, this can be done with some new logic that I added to my
BackupPC_deleteFile program.

Specifically, put the list of files that you want to keep for only a
limited number of backups in a file say "agefile".

So then if for example if you want to use non-mangled filenames for
your file list and you want to only save the last 3 backups then add
the following to your config.pl file:

        $Conf{DumpPostUserCmd} = 'BackupPC_deleteFile -h $host -s - -m -r -n
        -[4] -F agefile

There are a couple of caveats:
- The program is still 'beta' so don't use it for critical backups
  until your comfortable that it works for you.
- The program cannot delete hard links or directories containing hard links.
- The method can be slow if you are deleting really big & deep trees
  since files may need to be linked recursively forward from prior
  incremental backups.

In any case, here is the broader description of options:

usage: $0 [options] files/directories...

  Required options:
    -h host         Host (or - for all) from which path is offset
    -n backRange    Range of successive backup numbers to delete.
                    N   delete files from backup N (only)
                    M-N delete files from backups M-N (inclusive)
                    -M  delete files from all backups up to M (inclusive)
                    M-  delete files from all backups up from M (inlusive)
                    -   delete files from ALL backups
                   {N}  if one of the numbers  is in braces, then  interpret
                        as the N\'th backup counting from the *beginning*
                   [N]  if one of the numbers  is in braces, then  interpret
                        as the N\'th backup counting from the *end*

  Optional options:
    -s shareName    Share name (or - for all) from which path is offset
                    (don\'t include the 'f' mangle)
                    NOTE: if -s option not set, then file/directory names 
                    must include the share name
    -l              Just list backups by host (with level noted in parentheses)
    -r              Allow directories to be removed too (otherwise skips over 
directories)
    -m              Paths are unmangled (i.e. apply mangle to paths)
    -F <file>       Read files/directories from <file> (or stdin if <file> = -)
    -q              Don\'t show deletions
    -t              Trial run -- do everything but deletions
    -c              Clean up pool - schedule BackupPC_nightly to run (requires 
server running)
                    Only runs if files were deleted
    -d level        Turn on debug level

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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/

<Prev in Thread] Current Thread [Next in Thread>
  • [BackupPC-users] Solution to keeping files selectively by "age" of backups, Jeffrey J. Kosowsky <=