Bacula-users

Re: [Bacula-users] Trouble on restore! Please help!

2009-12-23 09:07:30
Subject: Re: [Bacula-users] Trouble on restore! Please help!
From: Gabriele Bulfon <gbulfon AT sonicle DOT com>
To: Martin Simmons <martin AT lispworks DOT com>
Date: Wed, 23 Dec 2009 14:30:35 +0100 (CET)
Thank you very much for your help, just some info about how I solved:
- I did not have the "update media" on my versione of bacula (2.2)
- Upgraded to 2.4.x latest, still no "update media"
- Updated the media on the volume via sql, and bscan did not warn anymore about media type mismatch
- Tried a "file search" on "rest", but bacula never showed me the bscanned jobs as possible
- Using option 3 of "rest", via job id, I could always brwose the tree and mark, but always the same problem on "done"

It's as if bscan was not placing all the data correctly, so dird was not finding everything right.

Then I decided a last approach: my concurrent backups always ended with a last single backup of the Catalog. So this was the only file I could be sure to "bextract" manually.
I "bextracted" bacula.sql from this tape, renamed my current db to baculaok, imported the old bacula.sql situation, ran bacula against thid db, restored succesfully, finally placed back the baculaok to bacula db, and restarted bacula.

This solved :)

Thanks anyway for your help.
Gabriele.

Gabriele Bulfon - Sonicle S.r.l.
Tel +39 028246016 Int. 30 - Fax +39 028243880
Via Felice Cavallotti 16 - 20089, Rozzano - Milano - ITALY
http://www.sonicle.com



----------------------------------------------------------------------------------

Da: Martin Simmons <martin AT lispworks DOT com>
A: gbulfon AT sonicle DOT com
Cc: bacula-users AT lists.sourceforge DOT net
Data: 21 dicembre 2009 17.32.34 CET
Oggetto: Re: [Bacula-users] Trouble on restore! Please help!

You can see the media type of the volumes with the "list media" command and
change them using "update media volume=..."

__Martin

>>>>> On Mon, 21 Dec 2009 12:42:01 +0100 (CET), Gabriele Bulfon said:
>
> hi, I tried to see how the bsr was written for a normal recent backup, and I find it like:
> Volume="SABATO"
> MediaType="LIBRARY"
> Device="QUANTUM"
> Slot=6
> VolSessionId=7
> VolSessionTime=1261143945
> VolFile=23
> VolBlock=0-15498
> FileIndex=3930
> Count=1
> I see MediaType is set to LIBRARY, as it is now.
> As you can see from my bscan, Bacula found a label with MediaType=LTO, because the tape
> was first labeled through a single lto device, that was originally named as MediaType=LTO,
> then the customer bought a Library device, and we changed configuration to MeditaType=LIBRARY,
> but we did not re-labeled tapes.
> Maybe bacula is causing an error because he cannot find the LTO MediaType? how can I dig into
> the DB for this LTO information? Maybe I can switch it to LIBRARY via sql?
> Thanks in advance.
> Gabriele.
> Gabriele Bulfon - Sonicle S.r.l.
> Tel +39 028246016 Int. 30 - Fax +39 028243880
> Via Felice Cavallotti 16 - 20089, Rozzano - Milano - ITALY
> http://www.sonicle.com
> ----------------------------------------------------------------------------------
> Da: Martin Simmons
> A: bacula-users AT lists.sourceforge DOT net
> Data: 21 dicembre 2009 11.49.37 CET
> Oggetto: Re: [Bacula-users] Trouble on restore! Please help!
> I don't see any debug messages for that code, so I think the only way to debug
> it is using gdb on bacula-dir. The message "No files found to
> restore/migrate." means that the function write_bsr has returned 0, which is
> unexpected.
> __Martin
> On Mon, 21 Dec 2009 09:26:27 +0100 (CET), Gabriele Bulfon said:
> Hi, it's 2.2.2, I can't upgrade yet.
> Is there any way I can check for errors? I can't find any inside the logs.
> Gabriele Bulfon - Sonicle S.r.l.
> Tel +39 028246016 Int. 30 - Fax +39 028243880
> Via Felice Cavallotti 16 - 20089, Rozzano - Milano - ITALY
> http://www.sonicle.com
> -= Mail sent through WebTop2 =-
> ----------------------------------------------------------------------------------
> Da: Martin Simmons
> A: bacula-users AT lists.sourceforge DOT net
> Data: 18 dicembre 2009 22.56.30 CET
> Oggetto: Re: [Bacula-users] Trouble on restore! Please help!
> On Fri, 18 Dec 2009 18:01:57 +0100 (CET), Gabriele Bulfon said:
> Hello, I'm having trouble restoring some files from an old backup.
> The job is no more in my db, so I had to run a bscan to reconstruct it.
> I also tried with bextract, but because the backup is concurrent I got a wrong file.
> During bscan, here is a summary of the output:
> bscan: butil.c:282 Using device: "QUANTUM" for reading.
> 18-Dec 11:35 bscan: Invalid slot=0 defined in catalog for Volume "GIOVEDI2" on "QUANTUM" (/dev/rmt/1cbn). Manual load my be required.
> 18-Dec 11:35 bscan: 3301 Issuing autochanger "loaded? drive 0" command.
> 18-Dec 11:35 bscan: 3302 Autochanger "loaded? drive 0", result is Slot 4.
> 18-Dec 11:35 bscan: Ready to read from volume "GIOVEDI2" on device "QUANTUM" (/dev/rmt/1cbn).
> bscan: bscan.c:276 First Volume Size = 0nbscan: bscan.c:288 Using Database: bacula, User: bacula
> bscan: bscan.c:430 Pool record for Default found in DB.
> bscan: bscan.c:444 Pool type "Backup" is OK.
> bscan: bscan.c:454 Media record for GIOVEDI2 found in DB.
> bscan: bscan.c:469 VOL_LABEL: MediaType mismatch. DB=LIBRARY Vol=LTO
> bscan: bscan.c:976 Created Client record for Client: iserver-fd
> bscan: bscan.c:1059 Created new JobId=2344 record for original JobId=1936
> 18-Dec 11:35 bscan: End of file 1 on device "QUANTUM" (/dev/rmt/1cbn), Volume "GIOVEDI2"
> bscan: bscan.c:681 32,768 file records. At file:blk=1:27,456 bytes=1,770,245,645
> 18-Dec 11:35 bscan: End of file 2 on device "QUANTUM" (/dev/rmt/1cbn), Volume "GIOVEDI2"
> ...
> ...
> ...
> 18-Dec 13:42 bscan: End of file 223 on device "QUANTUM" (/dev/rmt/1cbn), Volume "GIOVEDI2"
> 18-Dec 13:42 bscan: End of Volume at file 223 on device "QUANTUM" (/dev/rmt/1cbn), Volume "GIOVEDI2"
> bscan: bscan.c:318 ========== JobId=0 ========
> bscan: bscan.c:935 Updated Media record at end of Volume: GIOVEDI2
> bscan: bscan.c:350 First Volume Size = 0n18-Dec 13:42 bscan: End of all volumes.
> bscan: bscan.c:935 Updated Media record at end of Volume: GIOVEDI2
> bscan: bscan.c:630 End of all Volumes. VolFiles=223 VolBlocks=0 VolBytes=221,901,387,132
> Records added or updated in the catalog:
> 1 Media
> 1 Pool
> 4 Job
> 1367418 File
> First, notice that bscan warned with a "VOL_LABEL: MediaType mismatch. DB=LIBRARY Vol=LTO".
> I probably labeled these media when the MediaType was still LTO, then changed into LIBRARY
> (these are the names I use for single ltos and libraries).
> I hope this is not causing my problem.
> So, once finished, I ran bconsole, list jobs and found my job number.
> Checked that a list volumes was showing my current tapes to be in the slots correctly.
> Ran a restore via job number, marked 4 files in a directory, checked they were marked
> with lsmark and also with estimate, and it was correct.
> So I happily typed "done" to go on as usual...but I got this response:
> $ lsmark
> *simlifo
> *simlifo.14052009
> *simlifo.311208
> *simlifo.dopo6162
> $ estimate
> 232387 total files; 4 marked to be restored; 417,792 bytes.
> $ done
> No files found to restore/migrate. No bootstrap file written.
> No files selected to be restored.
> What happened?! Anyone can help???
> Which version are you running? Maybe it is fixed in 3.0.3?
> __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
> ------------------------------------------------------------------------------
> 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



------------------------------------------------------------------------------
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
<Prev in Thread] Current Thread [Next in Thread>