Bacula-users

Re: [Bacula-users] losing directory permissions and ownership

2009-10-26 18:27:22
Subject: Re: [Bacula-users] losing directory permissions and ownership
From: Avi Rozen <avi.rozen AT gmail DOT com>
To: Martin Simmons <martin AT lispworks DOT com>
Date: Tue, 27 Oct 2009 00:22:37 +0200
Martin Simmons wrote:
>>
>> I'd like to cherry pick directories to backup and have them restored
>> with correct ownership and permissions...
>>
>> What am I doing wrong? Is this the expected behavior?
>>     
>
> Yes, this is the expected behavior.
>
> During a backup, Bacula looks inside the directories you give in the 'File ='
> lines and doesn't save any information about the parents.
>
>   

Would be nice if it did...

> It is difficult to get the cherry picking behaviour, but I think it is
> possible.  You need to start higher up the tree and use two Options clauses to
> select the files to include and exclude.  The first Options clause must match
> only what you want to back up (the parent directories themselves plus the
> cherry picked files/directories, but not other contents of the parent
> directories).  The second Options clause should use wild = "*" and Exclude=yes
> to remove everything else.
>   

Thanks for the explanation and tips.

I tried it and a few other file set configurations, based on the
examples in [1], specifically the following, which is supposed to
include only home directories of users whose usernames start with either
'a' or 'b':

FileSet {
  Name = "Full Set"
  Include {
     Options {
        wilddir = "/home/a*"
        wilddir = "/home/b*"
     }
     Options {
        RegexDir = ".*"
        exclude = yes
     }
     File = /home
  }
}

But I can't get bacula to do what I want. I tried  the following file
set to backup files in my test directory, but it excludes everything
except for files in the root directory:

FileSet {
  Name = test-fileset
  Include {
    Options {
        wilddir =
"/home/avrozen/temp/bacula-test/owned-by-root/owned-by-avrozen/owned-by-bacula"
    }
    Options {
        regexdir = ".*"
        Exclude = yes
    }
    File = /
  }
}

Any ideas? What am I missing?

Thanks,
Avi


[1]http://www.bacula.org/3.0.x-manuals/en/install/install/Configuring_Director.html#SECTION00670000000000000000



> __Martin
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>   


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users