Please give each of your File storage devices a different Media Type. Restore keys on Media Type to find the correct Storage device.
On Monday 14 November 2005 17:08, Willard Korfhage wrote: > I'm having trouble getting a backup to restore, and was wondering if > someone can tell me where I am going wrong, or if it is a bug. I am > testing bacula on 2 machines, lintest being a backup server and va1 a > client, all running linux and bacula 1.38.0. Because I wanted backups of > lintest and va1 to be treated separately, I set up 2 Storage devices and > 2 Pools. The problem is that the restore seems to be reading from the > wrong Storage, and can't find the backup volumes. To get specific, I > here is the client backup job as defined in bacula-dir.conf: > > Job { > Name = "VA1 Test" > JobDefs = "DefaultJob" > Write Bootstrap = "/var/bacula/Va1_Test.bsr" > FileSet = Va1Files > Storage = Va1Directory > Pool = Va1Pool > } > > Storage { > Name = TmpDirectory > Address = lintest > SDPort = 9103 > Password = <removed> > Device = TmpFileStorage > Media Type = File > } > > > Storage { > Name = Va1Directory > Address = lintest > SDPort = 9103 > Password = <removed> > Device = Va1FileStorage > Media Type = File > } > > Then bacula-sd.conf contains > > Device { > Name = TmpFileStorage > Media Type = File > Archive Device = /tmp > LabelMedia = yes; > Random Access = Yes; > AutomaticMount = yes; > RemovableMedia = no; > AlwaysOpen = no; > } > > Device { > Name = Va1FileStorage > Media Type = File > Archive Device = /tmp/va1 > LabelMedia = yes; > Random Access = Yes; > AutomaticMount = yes; > RemovableMedia = no; > AlwaysOpen = no; > } > > The va1 backups are put in /tmp/va1, and the lintest backups are put in > /tmp. That works just fine. > > Then, back in bacula-dir.conf, I defined a restore job, the first being > intended for lintest backups and the second for va1 backups. > > Job { > Name = "RestoreFiles" > Type = Restore > Client=lintest-fd > FileSet="Bacula Source" > Storage = TmpDirectory > Pool = Default > Messages = Standard > Where = /tmp/bacula-restores > } > > Job { > Name = "RestoreFilesForVa1" > Type = Restore > Client=va1-fd > FileSet=Va1Files > Storage = Va1Directory > Pool = Va1Pool > Messages = Standard > Where = /tmp/bacula-restores > } > > I backed up a few files from va1, and now I try to restore them. I enter > the "restore" command in bconsole, pick the most recent backup for > va1 and mark some files. The first oddity comes when I pick a restore job > > The defined Restore Job resources are: > 1: RestoreFiles > 2: RestoreFilesForVa1 > Select Restore Job (1-2): 2 > Run Restore job > JobName: RestoreFilesForVa1 > Bootstrap: > /var/bacula/lintest-dir.restore.*Console*.2005-11-14_09.27.29.bsr > Where: /tmp/bacula-restores > Replace: always > FileSet: Va1Files > Client: lintest-fd > Storage: TmpDirectory > When: 2005-11-14 09:29:12 > Catalog: MyCatalog > Priority: 10 > OK to run? (yes/mod/no): > > Note that the Client and Storage this quotes are not what was configured. > In particular, the storage is wrong. So I do a mod, pick Va1Directory as > the storage and then get > > Run Restore job > JobName: RestoreFilesForVa1 > Bootstrap: > /var/bacula/lintest-dir.restore.*Console*.2005-11-14_09.27.29.bsr > Where: /tmp/bacula-restores > Replace: always > FileSet: Va1Files > Client: lintest-fd > Storage: Va1Directory > When: 2005-11-14 09:29:12 > Catalog: MyCatalog > Priority: 10 > OK to run? (yes/mod/no): > > Presumably the client has to remain as lintest because that's where the > backups are. When I run the job, it is looking in the wrong Storage > > 14-Nov 09:42 lintest-sd: RestoreFilesForVa1.2005-11-14_09.41.58 Fatal > error: acquire.c:199 Open device "TmpFileStorage" (/tmp) Volume > "VA1Backup0003" failed: ERR=dev.c:466 Could not open: > /tmp/VA1Backup0003, ERR=No such file or directory > > 14-Nov 09:42 lintest-fd: RestoreFilesForVa1.2005-11-14_09.41.58 Fatal > error: job.c:1597 Bad response to Read Data command. Wanted 3000 OK data > , got 3000 error > > Very odd, it was still using TmpDirectory for the stores. > > I tried modifying the default Storage for jobs to be Va1Directory, but > that didn't work. Nor did modifying the storage for the "RestoreFiles > job to point to Va1Directory. > > I did change the name of the TmpDirectory storage entry to be > xTmpDirectory, and the Device within that to be xTmpFileStorage. These > are names not referenced anywhere. But then when I run the restore I get > > JobName: RestoreFilesForVa1 > Bootstrap: > /var/bacula/lintest-dir.restore.*Console*.2005-11-14_09.53.14.bsr > Where: /tmp/bacula-restores > Replace: always > FileSet: Va1Files > Client: lintest-fd > Storage: xTmpDirectory > When: 2005-11-14 09:53:34 > Catalog: MyCatalog > Priority: 10 > > It looks like Bacula is picking up and using the first Storage. > > I mod it to have Storage Va1Directory, then when I run it, I don't get > an error. Instead I get > > JobId Level Name Status > ====================================================================== > 12 RestoreFilesForVa1.2005-11-14_09.54.01 is waiting on > Storage Va1Directory > ==== > > And the job seems to hang at that point. It still seemed to be looking at > xTmpFile Storage, based on the error message that resulted when I > cancelled the job > > 14-Nov 09:58 lintest-dir: RestoreFilesForVa1.2005-11-14_09.54.01 Fatal > error: > Storage daemon didn't accept Device "xTmpFileStorage" because: > > Finally, I tried switching the order of the storage definitions in > bacula-dir.conf, so Va1Directory was first. That restore job ran fine. > So, it appears that bacula insists on using the first storage definition > it finds for all restore jobs. It seems like a bug to me, but maybe I am > just using it incorrectly? > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. Get Certified Today > Register for a JBoss Training Course. Free Certification Exam > for All Training Attendees Through End of 2005. For more info visit: > http://ads.osdn.com/?ad_idv28&alloc_id845&opÌk > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users -- Best regards, Kern ("> /\ V_V ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_idv28&alloc_id845&op=click _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users