BackupPC-users

Re: [BackupPC-users] DumpPreUserCmd commands only on full backups?

2011-08-06 21:07:46
Subject: Re: [BackupPC-users] DumpPreUserCmd commands only on full backups?
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: Sat, 06 Aug 2011 21:05:21 -0400
Brad Alexander wrote at about 16:41:44 -0400 on Friday, August 5, 2011:
 > As the subject posits, is it possible to issue a dump pre- or post-command
 > only on certain types of backups? For instance, we run bacula at work, and
 > apparently the director states what kind of backup is running, either Full
 > or Incr. So in your scripts, you can do something like
 > 
 > if [ $1 != "Full" ] ; then
 >   exit 0
 > fi
 > 
 > ...Rest of script...
 > 
 > We use it to clear some specialized logs after they have been backed up in a
 > Full. Is something like this possible in backuppc?
 > 

This should be possible... according to the config.pl inline
documentation (you have read it, right????), the following variable is
available to $Conf{DumpPreUserCmd}, $Conf{DumpPostUserCmd},
$Conf{DumpPreShareCmd} and $Conf{DumpPostShareCmd}:
                 $type         type of dump (incr or full)

So just write a script with the above logic and pass it $type on the
command line when called from one of the above 'Cmd' variables.

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
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>