Package: flexbackup
Version: 1.2.1-5
Severity: wishlist
Tags: patch

I would like to be able to exclude certain directories from flexbackup's
backup process, without having to edit the configuration file.  In
particular, I want my users to be able to specify directories that
should not be backed up (such as project build directories and the like)
without administrative intervention.

I have implemented one means of doing this, by way of including a
.nobackup file in the directory to exclude.  A patch is pasted in below.
Note that it does not work on remote filesystems because I do not use
them.  Note also that it takes an additional short period of time to
execute because it uses a separate find(1) call to locate files named
.nobackup.

I hope that this is useful.

*** /usr/bin/flexbackup 2006-09-23 17:09:52.000000000 -0400
--- /usr/local/bin/flexbackup   2007-05-23 21:43:11.000000000 -0400
***************
*** 4863,4868 ****
--- 4863,4876 ----
        $prunekey = $dir;
      }

+     my @nobackup = ();
+     if (!defined($remote)) {  # TODO: allow this on remote filesystems
+         @nobackup = split(/\n/, `cd $dir && $cmd -name .nobackup | sed
-e 's/^\\.\\/\\(.*\\)\\/\\.nobackup\$/\\1/'`);
+         for my $nobackup (@nobackup) {
+             $::prune{$prunekey}{$nobackup} = 1;
+         }
+     }
+
      if (defined(%{$::prune{$prunekey}})) {
        # FreeBSD needs -E (above) and no backslashes around the (|)
        # chars
        if ($::uname =~ /FreeBSD/) {

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.20
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages flexbackup depends on:
ii  cpio                          2.6-17     GNU cpio -- a program to manage ar
ii  perl                          5.8.8-7    Larry Wall's Practical Extraction 

Versions of packages flexbackup recommends:
ii  afio                          2.5-4      archive file manipulation program
ii  binutils                      2.17-3     The GNU assembler, linker and bina
pn  buffer                        <none>     (no description available)
ii  rsync                         2.6.9-2    fast remote file copy program (lik
ii  sharutils                     1:4.2.1-15 shar, unshar, uuencode, uudecode
ii  zip                           2.32-1     Archiver for .zip files

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to