Bacula-users

Re: [Bacula-users] Fileset inclusion list question

2013-05-23 09:36:20
Subject: Re: [Bacula-users] Fileset inclusion list question
From: Radosław Korzeniewski <radoslaw AT korzeniewski DOT net>
To: Jonathan Bayer <linuxgurugamer AT gmail DOT com>, bacula-users <bacula-users AT lists.sourceforge DOT net>
Date: Thu, 23 May 2013 15:30:19 +0200
Hello,

2013/5/23 Jonathan Bayer <linuxgurugamer AT gmail DOT com>
Ok.  So this is either a "feature" or a "bug" depending on your point of view :-)


In my point of view it is not a "bug" nor a "feature". User wants to copy recursive all files from "/" and from "/usr" filesystems, so any available utility will copy some files twice in your case. User asked for it.
 
So, how about this for a workaround:

Create a shell script on each target system (I put them into /etc/bacula/bin) which contains the following:

listfilesystems:
#!/bin/bash

# List of filesystems to be excluded.  All command-line options are assumed to be
# other filesystems to be excluded

EXCLUDE="/dev /proc /tmp /sys $*"

# Get list of all filesystems
fs=`df -P | sed -e's/  */ /g' | cut -f 6 -d' ' | sed 1d`

for excludes in $EXCLUDE; do
        a1=""
        for i1 in $fs; do
                case $i1 in
                        "$excludes"*)  ;;
                        *)      a1="$i1 $a1"
                                ;;
                esac
        done
        fs=$a1
done
# Following to put one filesystem per line
for i in $fs; do
        echo $i
done
Then, in the fileset, add the following:
Fileset {
  ...
  File = "\\|/etc/bacula/bin/listfilesystems"
  ...
}
As I understand it, this will call the script on the remote system, and include the output as part of the files to be backed up.  By listing the individual filesystems, they will all get backed up.

 

I have a little cleanup, but would like to get input from more experienced bacula admins before I implement this.


I personally prefer a number of static fileset definitions which match expected filesystems on client machine.
The same for fifos (your another thread). I personally prefer bpipe plugin.

best regards
--
Radosław Korzeniewski
radoslaw AT korzeniewski DOT net
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>