On Friday 08 December 2006 18:49, Benjamin Chambers wrote: > > Kern, > > Thanks to your email and Robert Nelson's, I saw the patch you applied in the > 1.39 tree. Just one line removed, yes?
Yes, but I also added an unbash_spaces(...) just a bit later in the same file. If you don't apply the second patch and have spaces in any of your Volume names to be restored, you will have similar problems. I recommend adding it too. > > askdir.c > > Remove "dcr->VolumeName[0] = 0;" from method "do_get_volume_info". > > I applied this to the version we are currently using (1.38.9), and tested. It > seems to have solved the problem! OK, many thanks for the feedback. It is nice to have it confirmed. As it turns out, I did make the failure of the SD to access the catalog only a warning message, but what I did not count on was that when the Dir reported no volume, the subroutine had zapped the Volume name, so that the restore then would not work. > > I think we can maintain this modification for the current time, and move up a > full version to 1.40 when available. > > Thanks for all that you do. Thanks for finding this bug and pointing it out. > > Cheers, > > Ben > > Benjamin Chambers, P.Eng. > ClarkConnect Account Manager > Point Clark Networks > 1179 King Street West, Suite 211 > Toronto, ON > Canada, M6K 3C5 > > Tel: +1.416.977.0574 Ext. 111 > Fax: +1.416.946.1192 > Email: [EMAIL PROTECTED] > > Kern Sibbald wrote: > > On Friday 08 December 2006 16:06, Benjamin Chambers wrote: > >> Hi Kern, > >> > >>>> On thing that you might try is to add the Volume name(s) to the catalog > > by > >>>> doing an add command before running the restore. > >> This can't be done because there are no pools defined in an empty database > > and > >> the pool is not included in the BSR: > >> > >> ====bcsonole start==== > >> *add volume > >> You probably don't want to be using this command since it > >> creates database records without labeling the Volumes. > >> You probably want to use the "label" command. > >> > >> Using default Catalog name=MyCatalog DB=bacula > >> No pools defined. Use the "create" command to create one. > >> ====bcsonole end==== > >> > >> At this point, I'll either have to rewrite our code/documentation to use > >> bextract or maintain a patch for 1.38.x to behaive as 1.36.x did (at this > > point, > >> I don't know what that patch might entail, but it should be fairly simple to > >> diff between the two releases). > >> > >> What would you suggest? I know I've caught you at a bad time because of the > >> imminent release of 1.40 - would you be able to advise on a patch which > > removes > >> the SD statistic write to the Catalog which may be the cause? > > > > Well, it wasn't such a bad time to catch me because I wouldn't want the same > > problem to go out in 1.40, so I came up with a fix, but have not tested it. > > That said, I am a bit overworked at the moment ... > > > > You have several options: > > > > 1. Execute the Director once on the machine with a valid bacula-dir.conf file > > and it will create everything in the database you need to add the Volume (a > > dummy entry) -- I think. > > > > 2. If you can accept a patch to 1.38.11 (you did not specify the exact version > > -- at least in this email), I will create a patch, which as I said is not > > tested in your circumstance, but I *think* it will fix the problem. The > > patch to 1.39.30 does pass all the regression scripts so it doesn't seem to > > break anything obvious. > > > > Regards, > > > > Kern > > > > > >> Cheers, > >> > >> Ben > >> > >> > >> Benjamin Chambers, P.Eng. > >> ClarkConnect Account Manager > >> Point Clark Networks > >> 1179 King Street West, Suite 211 > >> Toronto, ON > >> Canada, M6K 3C5 > >> > >> Tel: +1.416.977.0574 Ext. 111 > >> Fax: +1.416.946.1192 > >> Email: [EMAIL PROTECTED] > >> > >> Kern Sibbald wrote: > >>> On Thursday 07 December 2006 22:11, Benjamin Chambers wrote: > >>>> Bacula version 1.38.9/1.38.11 with MySQL > >>>> > >>>> I would very much appreciate it if anyone could clarify an issue that has > >>> come > >>>> up while attempting to restore from a bootstrap file. > >>>> > >>>> The question is actually fundamentally quite simple...Can a BSR file be > > used > >>> to > >>>> perform a restore if you have the boostrap file and backup data...but > > have > >>> lost > >>>> the Catalog? The situation being, of course, failure of the server > > itself, > >>>> where Bacula runs. > >>>> > >>>> I have gone under the assumption for the last year or so that this was > >>> possible, > >>>> but with current testing over the last week, I'm starting to think this > > it > >>> is not. > >>> > >>> In principle it was supposed to work without needing the catalog. It > > looks > >>> like at some point I wasn't thinking through all the consequences and > > added > >>> code to ensure that the SD updated the catalog with the read statistics, > > so I > >>> imagine that is what is going on. > >>> > >>> On thing that you might try is to add the Volume name(s) to the catalog by > >>> doing an add command before running the restore. > >>> > >>> The correct solution is for the SD during a restore to attempt to read the > >>> Volume data from the catalog, but instead of failing when the data is not > >>> there, it should complain and continue. > >>> > >>>> The test is to save to a mounted file (Windows share) system. I had read > > in > >>>> prior posts where the MediaType must be unique or you get into some > >>> problems. I > >>>> have ensured to do this. > >>>> > >>>> Here's a short summary of test results: > >>>> > >>>> TEST 1 > >>>> ====== > >>>> 1. Perform a backup of the server > >>>> 2. Perform a 'run job=Restore' using 'mod' to specify the BSR file > > created > >>>> automatically in step 1. > >>>> > >>>> Result: Restore OK (the catalog still existed) > >>>> > >>>> TEST 2 > >>>> ====== > >>>> 1. Perform a backup of the server > >>>> 2. Run /drop_mysql_database, create_mysql_database, make_mysql_tables > >>> scripts > >>>> to simulate the loss of the server (Catalog). > >>>> 3. Perform a 'run job=Restore' using 'mod' to specify the BSR file > > created > >>>> automatically in step 1. > >>>> > >>>> Result: Restore FAILS > >>>> > >>>> I have provided some debug below. It looks as though the restore first > >>> tries to > >>>> match the VolumeName picked up from the BSR against the Catalog. > >>> Containing > >>>> no data (because the database was re-initialized between backup/restore), > >>> this > >>>> operation, of course, fails. At this point, I'm not certain what > >>> happens...if a > >>>> BSR restore with no Catalog is possible, one would think that the SD > > would > >>> see > >>>> if it could find the Volume specified in the BSR. I *think* this is > >>> happening, > >>>> but somewhere along the line, the VolumeName becomes nil. > >>>> > >>>> I know I can use bextract to do a successful restore in this case...but > > it's > >>> not > >>>> as convenient and it would be good to clear up the capabilities anyways, > >>> because > >>>> the section on "Disaster Recovery" doesn't (IMO) definitively say what > > I'm > >>>> trying to do is possible. > >>>> > >>>> Thanks in advance to anyone who has time and knowledge to shed some > > light. > >>>> Cheers, > >>>> > >>>> Ben > >>>> > >>>> ******Job Report****** > >>>> 07-Dec 15:58 Server-sd: Restore.2006-12-07_15.58.46 Warning: acquire.c:82 > >>> Error > >>>> getting Volume info: 1997 Volume "2006-12-07-0" not in catalog. > >>>> 07-Dec 15:58 Server-sd: Restore.2006-12-07_15.58.46 Fatal error: > >>> acquire.c:109 > >>>> Read open device "_BensLaptop" (/var/bacula/mnt/file/_BensLaptop) Volume > > "" > >>>> failed: ERR=Could not open file device "_BensLaptop" > >>>> (/var/bacula/mnt/file/_BensLaptop). No Volume name given. > >>>> > >>>> 07-Dec 15:58 Server-dir: Restore.2006-12-07_15.58.46 Error: Bacula > > 1.38.11 > >>>> (28Jun06): 07-Dec-2006 15:58:50 > >>>> JobId: 1 > >>>> Job: Restore.2006-12-07_15.58.46 > >>>> Client: Server-fd > >>>> Start time: 07-Dec-2006 15:58:49 > >>>> End time: 07-Dec-2006 15:58:50 > >>>> Files Expected: 0 > >>>> Files Restored: 0 > >>>> Bytes Restored: 0 > >>>> Rate: 0.0 KB/s > >>>> FD Errors: 0 > >>>> FD termination status: OK > >>>> SD termination status: Error > >>>> Termination: *** Restore Error *** > >>>> > >>>> ******SD in DEBUG****** > >>>> Server-sd: parse_bsr.c:168 Leave parse_bsf() > >>>> Next : 0x0 > >>>> Root bsr : 0x91b72a8 > >>>> VolumeName : 2006-12-07-0 > >>>> MediaType : File-9353 > >>>> Device : > >>>> Slot : 0 > >>>> SessId : 1 > >>>> SessTime : 1165524894 > >>>> VolFile : 0-0 > >>>> VolBlock : 929920-1430482 > >>>> FileIndex : 1-468 > >>>> done : no > >>>> positioning : 1 > >>>> fast_reject : 1 > >>>> Server-sd: fd_cmds.c:135 <filed: read data 2 > >>>> Server-sd: fd_cmds.c:261 Read data: read data 2 > >>>> Server-sd: fd_cmds.c:263 <bfiled: read data 2 > >>>> Server-sd: read.c:46 Start read data. > >>>> Server-sd: parse_bsr.c:913 Added volume=2006-12-07-0 mediatype=File-9353 > >>>> Server-sd: read.c:62 Found 1 volumes names to restore. First=2006-12-07-0 > >>>> Server-sd: device.c:352 lock 0 from dev.c:697 > >>>> Server-sd: device.c:395 block set 3 from dev.c:698 > >>>> Server-sd: acquire.c:80 dir_get_volume_info > >>>> Server-sd: askdir.c:211 >dird: CatReq Job=Restore.2006-12-07_15.58.46 > >>> GetVolInfo > >>>> VolName=2006-12-07-0 write=0 > >>>> Server-sd: askdir.c:165 <dird 1997 Volume "2006-12-07-0" not in catalog. > >>>> Server-sd: askdir.c:177 Bad response from Dir fields=-1: 1997 Volume > >>>> "2006-12-07-0" not in catalog. > >>>> Server-sd: acquire.c:100 bstored: open vol= > >>>> Server-sd: dev.c:276 open dev: tape=0 dev_name="_BensLaptop" > >>>> (/var/bacula/mnt/file/_BensLaptop) vol= mode=OPEN_READ_ONLY > >>>> Server-sd: dev.c:285 call open_file_device mode=OPEN_READ_ONLY > >>>> Server-sd: acquire.c:195 Dec reserve=0 dev="_BensLaptop" > >>>> (/var/bacula/mnt/file/_BensLaptop) > >>>> Server-sd: device.c:408 unblock BST_DOING_ACQUIRE from dev.c:705 > >>>> Server-sd: acquire.c:200 jcr->dcr=(nil) > >>>> Server-sd: match_bsr.c:169 No nxt_bsr use_pos=1 repos=1 > >>>> Server-sd: device.c:352 lock 0 from acquire.c:353 > >>>> Server-sd: acquire.c:354 release_device device is disk > >>>> Server-sd: reserve.c:200 free_volume: no vol on dev "_BensLaptop" > >>>> (/var/bacula/mnt/file/_BensLaptop) > >>>> Server-sd: dev.c:1691 really close_dev "_BensLaptop" > >>>> (/var/bacula/mnt/file/_BensLaptop) > >>>> Server-sd: dvd.c:93 Enter unmount_dev > >>>> Server-sd: reserve.c:200 free_volume: no vol on dev "_BensLaptop" > >>>> (/var/bacula/mnt/file/_BensLaptop) > >>>> Server-sd: device.c:381 unlock from acquire.c:437 > >>>> Server-sd: read.c:83 Done reading. > >>>> Server-sd: dircmd.c:211 Command run requsts quit > >>>> Server-sd: mem_pool.c:363 garbage collect memory pool > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> -- > >>>> Benjamin Chambers, P.Eng. > >>>> ClarkConnect Account Manager > >>>> Point Clark Networks > >>>> 1179 King Street West, Suite 211 > >>>> Toronto, ON > >>>> Canada, M6K 3C5 > >>>> > >>>> Tel: +1.416.977.0574 Ext. 111 > >>>> Fax: +1.416.946.1192 > >>>> Email: [EMAIL PROTECTED] > >>>> > >>>> ------------------------------------------------------------------------- > >>>> Take Surveys. Earn Cash. Influence the Future of IT > >>>> Join SourceForge.net's Techsay panel and you'll get the chance to share > > your > >>>> opinions on IT & business topics through brief surveys - and earn cash > >>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > >>>> _______________________________________________ > >>>> Bacula-users mailing list > >>>> Bacula-users@lists.sourceforge.net > >>>> https://lists.sourceforge.net/lists/listinfo/bacula-users > >>>> > >>> > >> ------------------------------------------------------------------------- > >> Take Surveys. Earn Cash. Influence the Future of IT > >> Join SourceForge.net's Techsay panel and you'll get the chance to share your > >> opinions on IT & business topics through brief surveys - and earn cash > >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > >> _______________________________________________ > >> Bacula-users mailing list > >> Bacula-users@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/bacula-users > >> > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users