Re: [Bacula-users] Restoring from volumes on multiple storages
I started this thread on the bacula-users list, but I'm now also sending it to the bacula-devel list, as I seem to have taken that sort of turn. On Wed, Feb 25, 2009 at 10:12:19PM +0100, Arno Lehmann wrote: Hi, 25.02.2009 18:37, Graham Keeling wrote: Hello, Here I'm using bacula-2.2.8. I have a bacula storage daemon, 'Disk 1' (Device 'Disk 1.0') and a bacula storage daemon, 'BPL2Disk 1' (Device 'BPL2Disk 1.0'). There is one backup job allowed per volume. 'BPL2Disk 1' has a full backup and several incrementals. 'Disk 1' has the latest incremental. When I try to restore a job that needs four volumes in total including the latest one on 'Disk 1', it seems as if bacula doesn't bother trying to find the last volume on the second storage. It just tries the first and gives up. I have attached the .bsr file that was produced for the restore job. You can see that it has got the device names correct. The attached file 'log' shows the commands that I entered for the restore job into bconsole, the questions that it asked me, and the messages that bacula logged when it tried to run the restore. It clearly shows that bacula knows where the different volumes are, but it then ignored that information and tried to find all the volumes on 'BPL2Disk 1'. Have a found a bug, a limitation, a feature, or am I doing it wrong? A limitation (which should be documented somewhere...) The solution is to either pick the jobs manually, and start a restore for the set from one storage device first, then run a restore from the second storage devices volumes. Or, alternatively, you can take the bootstrap file you already have, split it in two in this location: FileIndex=320-321 FileIndex=540 Count=7 split here Volume=backup-0145 MediaType=File Device=Disk 1.0 VolSessionId=70 and run two separate restore jobs with the resulting bootstrap files. Thanks for your reply. I would have thought that the bacula director should be able to do this splitting up of the jobs to the separate storage daemons by itself. After all, it has already figured out where the volumes are. Whilst I was entering the commands into bconsole, it said this: Bootstrap records written to /var/lib/bacula/testingserv.examples.co.uk-di.restore.9.bsr The job will require the following Volume(s) Storage(s)SD Device(s) === backup-0031 BPL2Disk 1BPL2Disk 1.0 backup-0013 BPL2Disk 1BPL2Disk 1.0 backup-0297 BPL2Disk 1BPL2Disk 1.0 backup-0145 Disk 1Disk 1.0 809 files selected to be restored. You can see that it knows all the information that is needed. What needs to happen to get this 'fixed' so that it requires no fiddly manual intervention and just does what I told it to do (and what it knows it should do)? It seems to me that the director just needs to feed separate .bsr files to the separate storages that it needs the data from. Can this happen easily? Has anybody come across this, or thought about this before? It seems to me that this must be a reasonably common occurence. -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Restoring from volumes on multiple storages
On Wed, Feb 25, 2009 at 05:37:05PM +, Graham Keeling wrote: Hello, Here I'm using bacula-2.2.8. I have a bacula storage daemon, 'Disk 1' (Device 'Disk 1.0') and a bacula storage daemon, 'BPL2Disk 1' (Device 'BPL2Disk 1.0'). There is one backup job allowed per volume. 'BPL2Disk 1' has a full backup and several incrementals. 'Disk 1' has the latest incremental. When I try to restore a job that needs four volumes in total including the latest one on 'Disk 1', it seems as if bacula doesn't bother trying to find the last volume on the second storage. It just tries the first and gives up. I have attached the .bsr file that was produced for the restore job. You can see that it has got the device names correct. The attached file 'log' shows the commands that I entered for the restore job into bconsole, the questions that it asked me, and the messages that bacula logged when it tried to run the restore. It clearly shows that bacula knows where the different volumes are, but it then ignored that information and tried to find all the volumes on 'BPL2Disk 1'. Have a found a bug, a limitation, a feature, or am I doing it wrong? Hi Graham, sorry I cannot help you with your question, but I was under the impression that bacula is able to handle multiple storages and devices in a pool just fine (or are your volumes in different backup pools?). As we'll be adding a 2nd tape library / changer to an existing bacula installation next week I'd be very interested in some comments from the list gurus. All the best, Uwe -- uwe.schuerk...@nionex.net phone: [+49] 5242.91- 4740 fax:-9722 Hauptsitz: Avenwedder Str. 55, D-33311 Guetersloh, Germany Registergericht Guetersloh HRB 4196, Geschaeftsfuehrer: Horst Gosewehr NIONEX ist ein Unternehmen der DirectGroup Germany www.directgroupgermany.de -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Restoring from volumes on multiple storages
On Thu, Feb 26, 2009 at 01:30:36PM +0100, Uwe Schuerkamp wrote: On Wed, Feb 25, 2009 at 05:37:05PM +, Graham Keeling wrote: Hello, Here I'm using bacula-2.2.8. I have a bacula storage daemon, 'Disk 1' (Device 'Disk 1.0') and a bacula storage daemon, 'BPL2Disk 1' (Device 'BPL2Disk 1.0'). There is one backup job allowed per volume. 'BPL2Disk 1' has a full backup and several incrementals. 'Disk 1' has the latest incremental. When I try to restore a job that needs four volumes in total including the latest one on 'Disk 1', it seems as if bacula doesn't bother trying to find the last volume on the second storage. It just tries the first and gives up. I have attached the .bsr file that was produced for the restore job. You can see that it has got the device names correct. The attached file 'log' shows the commands that I entered for the restore job into bconsole, the questions that it asked me, and the messages that bacula logged when it tried to run the restore. It clearly shows that bacula knows where the different volumes are, but it then ignored that information and tried to find all the volumes on 'BPL2Disk 1'. Have a found a bug, a limitation, a feature, or am I doing it wrong? Hi Graham, sorry I cannot help you with your question, but I was under the impression that bacula is able to handle multiple storages and devices in a pool just fine (or are your volumes in different backup pools?). As we'll be adding a 2nd tape library / changer to an existing bacula installation next week I'd be very interested in some comments from the list gurus. Hello, In the Job resource, I had a pool for Fulls, a pool for Incrementals, and a Storage. After leaving it for a couple of weeks, I changed the Job so that it was now using a different Storage. So, it did a single Full backup and several Incrementals to the first Storage, then some more Incrementals on the second Storage. When I run the restore, the bacula director knows perfectly well what Storages the volumes are on, but it creates a single .bsr file and only sends it to the first Storage. The first Storage can't find one of the volumes that has been told about, and the director hangs around waiting for a 'mount request' until the Job times out. I've now looked at the bacula code a bit, and what I think it does is this (bear in mind that I'm not one of the proper bacula development guys, so I might be talking utter rubbish here): When you tell it to restore something, it creates a single .bsr file. Though the director knows the Storage that has each volume, the .bsr file does not contain that information. The director then takes that .bsr file and sends a run job= command back through the bconsole interface, like this (with the %s bits filled in - src/dird/ua_restore.c): run job=\%s\ client=\%s\ restoreclient=\%s\ storage=\%s\ bootstrap=\%s\ files=%u catalog=\%s\ As you can see, the Storage is set outside of the bootstrap file, and I think you can only specify one of them. So, that single Storage gets told to restore from all of the volumes, even if the director knows that some of the volumes shouldn't be there. I suppose that it's possible that if there was a volume in that place with the correct label, it would happily restore from it and give you odd files. One kludgy solution that I may have a go at trying is to make the director write out a separate .bsr file containing the correct set of volumes that it needs for each Storage, and then doing multiple run job= commands. This will set off multiple restores and you'd end up with multiple confirmation messages. It might all go horribly wrong if you're using plugins, mind. -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Restoring from volumes on multiple storages
Hello, Here I'm using bacula-2.2.8. I have a bacula storage daemon, 'Disk 1' (Device 'Disk 1.0') and a bacula storage daemon, 'BPL2Disk 1' (Device 'BPL2Disk 1.0'). There is one backup job allowed per volume. 'BPL2Disk 1' has a full backup and several incrementals. 'Disk 1' has the latest incremental. When I try to restore a job that needs four volumes in total including the latest one on 'Disk 1', it seems as if bacula doesn't bother trying to find the last volume on the second storage. It just tries the first and gives up. I have attached the .bsr file that was produced for the restore job. You can see that it has got the device names correct. The attached file 'log' shows the commands that I entered for the restore job into bconsole, the questions that it asked me, and the messages that bacula logged when it tried to run the restore. It clearly shows that bacula knows where the different volumes are, but it then ignored that information and tried to find all the volumes on 'BPL2Disk 1'. Have a found a bug, a limitation, a feature, or am I doing it wrong? Thanks, Graham. Volume=backup-0031 MediaType=File Device=BPL2Disk 1.0 VolSessionId=13 VolSessionTime=1234874410 VolFile=0 VolBlock=252-36141 FileIndex=5916-5917 FileIndex=5937-5948 FileIndex=5953 FileIndex=5956-5988 FileIndex=5994-6026 FileIndex=6033-6194 FileIndex=6196-6213 FileIndex=6218-6229 FileIndex=6231 FileIndex=6233-6235 FileIndex=6240-6249 FileIndex=6255-6258 FileIndex=6260-6288 FileIndex=6298-6299 FileIndex=6301 FileIndex=6319-6351 FileIndex=6353-6356 FileIndex=6363-6370 FileIndex=6375 FileIndex=6377-6380 FileIndex=6383-6392 FileIndex=6394-6431 FileIndex=6434-6443 FileIndex=6445-6455 FileIndex=6460 FileIndex=6469-6485 FileIndex=6487-6502 FileIndex=6506-6518 FileIndex=6538-6576 FileIndex=6580-6590 FileIndex=6593 FileIndex=6596 FileIndex=6599 FileIndex=6601 FileIndex=6603 FileIndex=6605 FileIndex=6607-6619 FileIndex=6622-6623 FileIndex=6625-6659 FileIndex=6669-6672 FileIndex=6676-6682 FileIndex=6686-6697 FileIndex=6702-6710 FileIndex=6712 FileIndex=6715-6723 Count=637 Volume=backup-0013 MediaType=File Device=BPL2Disk 1.0 VolSessionId=20 VolSessionTime=1234874410 VolFile=0 VolBlock=252-223147562 FileIndex=261-262 FileIndex=337 FileIndex=340-341 FileIndex=377 Count=6 Volume=backup-0297 MediaType=File Device=BPL2Disk 1.0 VolSessionId=10 VolSessionTime=1235246445 VolFile=0 VolBlock=252-204942679 FileIndex=205-206 FileIndex=307-308 FileIndex=320-321 FileIndex=540 Count=7 Volume=backup-0145 MediaType=File Device=Disk 1.0 VolSessionId=70 VolSessionTime=1234828903 VolFile=0 VolBlock=247-226944732 FileIndex=232-391 Count=160 bacula-restore-files[28963]: Connecting to Director 127.0.0.1:9101 bacula-restore-files[28963]: 1000 OK: testingserv.examples.co.uk-di Version: 2.2.8 (26 January 2008) bacula-restore-files[28963]: Enter a period to cancel a command. bacula-restore-files[28963]: restore client=tclient2-fd restorejob=tclient2-restore fileset=tclient2 data bacula-restore-files[28963]: Using Catalog MyCatalog bacula-restore-files[28963]: First you select one or more JobIds that contain files bacula-restore-files[28963]: to be restored. You will be presented several methods bacula-restore-files[28963]: of specifying the JobIds. Then you will be allowed to bacula-restore-files[28963]: select which files from those JobIds are to be restored. bacula-restore-files[28963]: To select the JobIds, you have the following choices: bacula-restore-files[28963]: 1: List last 20 Jobs run bacula-restore-files[28963]: 2: List Jobs where a given File is saved bacula-restore-files[28963]: 3: Enter list of comma separated JobIds to select bacula-restore-files[28963]: 4: Enter SQL list command bacula-restore-files[28963]: 5: Select the most recent backup for a client bacula-restore-files[28963]: 6: Select backup for a client before a specified time bacula-restore-files[28963]: 7: Enter a list of files to restore bacula-restore-files[28963]: 8: Enter a list of files to restore before a specified time bacula-restore-files[28963]: 9: Find the JobIds of the most recent backup for a client bacula-restore-files[28963]: 10: Find the JobIds for a backup for a client before a specified time bacula-restore-files[28963]: 11: Enter a list of directories to restore for found JobIds bacula-restore-files[28963]: 12: Cancel bacula-restore-files[28963]: Select item: (1-12): 6 bacula-restore-files[28963]: The restored files will the most current backup bacula-restore-files[28963]: BEFORE the date you specify below. bacula-restore-files[28963]: Enter date as -MM-DD HH:MM:SS :2009-02-24 21:50:06 bacula-restore-files[28963]: +---+---+--+---+-+-+ bacula-restore-files[28963]: | JobId | Level | JobFiles | JobBytes | StartTime | VolumeName | bacula-restore-files[28963]: +---+---+--+---+-+-+ bacula-restore-files[28963]: | 1,336 | F
Re: [Bacula-users] Restoring from volumes on multiple storages
Hi, 25.02.2009 18:37, Graham Keeling wrote: Hello, Here I'm using bacula-2.2.8. I have a bacula storage daemon, 'Disk 1' (Device 'Disk 1.0') and a bacula storage daemon, 'BPL2Disk 1' (Device 'BPL2Disk 1.0'). There is one backup job allowed per volume. 'BPL2Disk 1' has a full backup and several incrementals. 'Disk 1' has the latest incremental. When I try to restore a job that needs four volumes in total including the latest one on 'Disk 1', it seems as if bacula doesn't bother trying to find the last volume on the second storage. It just tries the first and gives up. I have attached the .bsr file that was produced for the restore job. You can see that it has got the device names correct. The attached file 'log' shows the commands that I entered for the restore job into bconsole, the questions that it asked me, and the messages that bacula logged when it tried to run the restore. It clearly shows that bacula knows where the different volumes are, but it then ignored that information and tried to find all the volumes on 'BPL2Disk 1'. Have a found a bug, a limitation, a feature, or am I doing it wrong? A limitation (which should be documented somewhere...) The solution is to either pick the jobs manually, and start a restore for the set from one storage device first, then run a restore from the second storage devices volumes. Or, alternatively, you can take the bootstrap file you already have, split it in two in this location: FileIndex=320-321 FileIndex=540 Count=7 split here Volume=backup-0145 MediaType=File Device=Disk 1.0 VolSessionId=70 and run two separate restore jobs with the resulting bootstrap files. Hope this helps, Arno Thanks, Graham. -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users -- Arno Lehmann IT-Service Lehmann Sandstr. 6, 49080 Osnabrück www.its-lehmann.de -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users