Bacula-users

Re: [Bacula-users] weird directory mode/date

2009-10-29 05:06:29
Subject: Re: [Bacula-users] weird directory mode/date
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 29 Oct 2009 10:01:15 +0100
Hello,

25.10.2009 14:56, Avi Rozen wrote:
> Hi,
> 
> I'm running Bacula/sqlite v3.0.2 on Debian/squeeze (package version is
> 3.0.2-3+b1).
> 
> I've noticed the following peculiar output when listing files in
> bconsole during restore:
> 
> $ dir
> drwxr-xr-x  184 root     root         12288  2009-07-04 10:57:41  /etc/
> ----------   0 root     root             0  1970-01-01 02:00:00  /home/
> drwxr-xr-x  50 root     root          4096  2009-06-28 11:18:19  /root/
> ----------   0 root     root             0  1970-01-01 02:00:00  /var/
> 
> After restoring files from the 0 mode directories, the directories are
> restored with their mode set incorrectly (and apparently arbitrarily) to
> 0751/drwxr-x--x, instead of the original mode (in my case: 0755/drwxr-xr-x).

Which happens because you don't actually back up the directory entries.

For example, /home above is not backed up. It's only implied by 
/home/avrozen, but Bacula never looks at the /home directory entry itself.

The files and directories that are actually backed up should get their 
corrct permissions set on restore, though.

A reasonable approach - if you need the permissions of the directories 
above the trees you select for back up now - is to include the home 
directory itself, and exclude everything you don't need.

A regular expression that matches everything except /home/avrozen/ 
shouldn't be hard to find :-)

Cheers,

Arno

> Furthermore, modification date/time for such directories is set to their
> restore time.
> 
> In all cases the owner was root, but I have a hunch that ownership is
> also lost.
> 
> The corresponding fileset is:
> 
> FileSet {
>   Name = machine-cycle-fileset
>   Include {
>     Options {
>       signature = SHA1
>       compression = GZIP
>       Exclude = yes
>       # Exclusions
>       WildDir = "/home/*/.mozilla*/*/*/Cache"
>       WildDir = "/home/*/.mozilla*/*/ImapMail"
>       WildDir = "/home/*/.thumbnails"
>       WildDir = "/home/*/.Trash"
>       WildDir = "/home/*/temp"
>       WildDir = "/home/*/tmp"
>       WildDir = "/home/*/.cache"
>     }
>     File = /home/avrozen
>     File = /root
>     File = /etc
>     File = /var/www
>     File = /var/lib/bacula
>   }
> }
> 
> My guess is that parent directories of directories that are specified
> with the File directive are shown/stored with 0 as their mode and date
> (in my case: /home, /var and /var/lib)
> 
> Is this a configuration problem, expected/documented behavior, or a bug?
> 
> Cheers,
> Avi.
> 
> ------------------------------------------------------------------------------
> 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
> 

-- 
Arno Lehmann
IT-Service Lehmann
Sandstr. 6, 49080 Osnabrück
www.its-lehmann.de

------------------------------------------------------------------------------
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

<Prev in Thread] Current Thread [Next in Thread>