Bacula-users

Re: [Bacula-users] preserving ownership of restored files

2009-05-14 11:35:00
Subject: Re: [Bacula-users] preserving ownership of restored files
From: Martin Simmons <martin AT lispworks DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 14 May 2009 16:29:33 +0100
>>>>> On Thu, 14 May 2009 06:26:00 -0700, David Newman said:
> 
> On 5/14/09 4:56 AM, Martin Simmons wrote:
> >>>>>> On Wed, 13 May 2009 18:57:43 -0700, David Newman said:
> >> A server crashed here after an upgrade/reboot. Much mayhem and sleep
> >> deprivation ensued. Ugh.
> >>
> >> Bacula came through with most of the files needed, but restored
> >> everything as root:wheel. This was from running bconsole, running
> >> restore, picking the Job IDs, and selecting files.
> >>
> >> The UID/GIDs did not exist on the new system at the time of the restore,
> >> but they do now. In this case I needed the files first so I'd know what
> >> UIDs/GIDs to use on the new system.
> >>
> >> How to preserve ownership/groups during a restore?
> > 
> > I would expect restore to do that automatically, using the numeric 
> > UIDs/GIDs.
> > This should work even if they aren't in the user/group databases.
> 
> That didn't happen, at least not for me.

Can you repeat it by doing another restore now that you have the user/groups
set up correctly?

Does OpenBSD run some kind of periodic security job that resets the ownership
of files with unknown UIDs/GIDs?


> > Did you restore all files in the backup?
> 
> No. In bconsole, I did this:
> 
> 1. restore
> 
> 2. Option 3, pick relevant job IDs (eight of them, in this case -- one
> full plus seven incremental backups)
> 
> 3. cd /directory_to_be_restored
> 
> 4. mark *
> 
> 5. done
> 
> 6. select host to be restored
> 
> 7. proceed

OK, that should definitely set the UIDs/GIDs of all of the marked files.  Note
however that it won't set them for /directory_to_be_restored or any
directories that Bacula created above this.


> > Does bls show non root:wheel ownership for the files on these volumes?
> 
> Sorry, me bacula newbie, not familiar with bls. Where do I run this
> (director or client) and what syntax to use?

bls is a command line program that you run on the Storage Daemon, probably
from /usr/local/sbin.  The syntax is like this:

bls -V MyVolume MyStorage

MyVolume is the name of the volume and MyStorage is the device "name" given in
the bacula-sd.conf.  If you are using tapes, unmount the drive from bconsole.
If you put your bacula-sd.conf in a non-standard place, then you'll need to
pass the -c option as well (see bls -\?).

__Martin

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users