>>>>> On Thu, 14 May 2009 13:35:22 -0700, David Newman said: > > On 5/14/09 8:29 AM, Martin Simmons wrote: > >>>>>> 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? > > Yes. This time the files were restored with the correct UID/GIDs.
The original problem is still a mystery then. I suggest doing a test with some arbitrary UID/GIDs that are not known. Create a file and change its owner/group e.g. with chown 12345:12345. Check that ls -l shows 12345 and then backup and restore these files and see what happens. > >>> 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. > > Might that be the problem? I created a /home/bacula/bacula-restore > directory on the new server as root before running the restore. That shouldn't cause a problem. __Martin ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Bacula-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-users
