Bacula-users

Re: [Bacula-users] problem restoring directory permissions

2010-01-12 14:06:22
Subject: Re: [Bacula-users] problem restoring directory permissions
From: Martin Simmons <martin AT lispworks DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 12 Jan 2010 19:03:06 GMT
>>>>> On Mon, 11 Jan 2010 11:06:04 -0800, Mark Nienberg said:
> 
> Recently one of my users accidentally deleted some files and directories from 
> a samba 
> file server.  I restored the missing stuff from a bacula backup, but the user 
> could 
> not access the restored files.  Some troubleshooting revealed that the files 
> were 
> restored correctly, but the directories containing the files were restored 
> with 
> incorrect permissions.
> 
> In order to understand what happened I did some simple testing on the bacula 
> server 
> itself. Here is the simple fileset for the server.
> 
> FileSet {
>    Name = "khyber Files"
>    Include {
>      Options {
>        signature=MD5
>        compression=GZIP
>      }
>      File = /etc
>      File = /home
>      File = /root
>    }  # end Include
> }
> 
> I created some subdirectories with various permissions inside the /root folder
> 
> drwxrwxrwx 2 root root 4.1k Jan  8 17:17 testdir/
> drwxr-xr-x 2 root root 4.1k Jan  8 17:12 testdir2/
> drwxrws--- 2 root root 4.1k Jan  6 18:24 testdir3/
> drwxr-xr-x 2 mark ftp  4.1k Jan 10 10:54 testdir4/
> 
> I added some test files inside the test folders. After a bacula backup was 
> performed, 
> I renamed the test directories by appending "-save" to them.  Then I restored 
> from 
> the bacula backup and compared the restored directories to the originals.
> 
> drwxrw-rw- 2 root root 4.1k Jan 11 10:31 testdir/
> drwxrwxrwx 2 root root 4.1k Jan  8 17:17 testdir-save/
> 
> drwxr--r-- 2 root root 4.1k Jan 11 10:31 testdir2/
> drwxr-xr-x 2 root root 4.1k Jan  8 17:12 testdir2-save/
> 
> drwxrw---- 2 root root 4.1k Jan 11 10:31 testdir3/
> drwxrws--- 2 root root 4.1k Jan  6 18:24 testdir3-save/
> 
> drwxr--r-- 2 mark ftp  4.1k Jan 11 10:31 testdir4/
> drwxr-xr-x 2 mark ftp  4.1k Jan 10 10:54 testdir4-save/
> 
> The problem seems to always be related to the group and others "x" 
> permission. The 
> files inside the test directories were all restored correctly.  The root 
> umask is 
> 022, but that doesn't explain this. Note that bacula correctly restored the 
> owner and 
> group so it is obviously saving the information about the directories.
> 
> Can anyone shed any light on what may be wrong with my configuration?  Or can 
> you 
> confirm that the same happens on your system?

Did you mark the directories to be restored or only the files?  I think the
problem could occur if you only restored the files.

What was the "Replace" setting for the restore?  At some point, restoring with
Replace not set to always would cause problems with the directory permissions,
but that might have been fixed.

__Martin

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users