Hi, On 5/31/2007 8:26 PM, Doug Breshears wrote: > I decided to create a new thread since it was different enough from the > last one (Migration almost complete). > > ------------------------------------ > Version: 2.0.3 > Platform: Ubuntu Dapper (BTW, if anybody needs help creating debs for > this I think I can help out) > Problem: Migrate job failed with error ("database locked") when > 'batched' with catalog backup run.
I never saw that message in my installations, I believe... > Sample Shell Script: > -------------------- > !/bin/sh > cd /etc/bacula > /usr/bin/bconsole << EOF > run job=BackupCatalog pool=Daily-File level=Full yes > run job=Migrate-Daily level=Full yes > EOF > -------------------- > Background: The catalog backup failed last night because I did not > change the config file correctly from 1.39 to 2.0.3. > I fixed the problem and ran the above script, thinking that since I have > the "Maximum Concurrent Jobs" set to 1, it would first run the backup > then the migrate. But the Migrate job failed immediately (like it didn't > wait at all) with the "Database locked" error while the BackupCatalog > Job completed successfully sometime after that. > After the Backup finished I was able to run the Migrate Job and it > completed successfully as well. > > Question: Did this happen just because the backup catalog job was > running when bconsole tried to schedule the Migration Job? If that is > the case then it would not happen normally, right? I thnk youre right regarding both points. The process that locked the catalog database was most probably the catalog dump. In my experience, though, Bacula doesn't fail jobs you start, but the job setup is stalled until the catalog can be accessed again. There might be version differences, though, as I'm currently running 2.0.2. > > Question2: (Just to make things tougher) Very thoughtful of you, thanks! :-) > If I change "Max Concurrent > Jobs" to 4, is the scheduler smart enough to know that I don't want it > to look at the jobs for migration until everything else is done, or > should I do something like a "wait" command to force it? No and no. Use priorities instead. For example, I have my routine jobs on priority 10, database dump jobs at 50 (or something), and the catalog backup at 100. This ensures that the jobs run in he order I want, and database dumps don't interfere with regular jobs. > > Example: > --------------------------------------------------- > if [ $backup_type = "daily" ] > then > /usr/bin/bconsole << EOF > run job=Ex1 SpoolData=yes pool=Daily-File level=Incremental yes > run job=TermServ pool=Daily-File level=Incremental yes > run job=Famous pool=Daily-File level=Incremental yes > run job=Famous-Oracle pool=Daily-File level=Incremental yes > run job=BackupCatalog pool=Daily-File yes > wait <------ Insert this line?? No, though it is a possibility. > run job=Migrate-Daily yes I'd prefer to add 'priority=50' either to the command above, or even set up the migration job to run at a higher priority number in the job definition. > EOF > --------------------------------------------------- > > The above script snippet is what gets run (with the exception of the > "wait" command) at 1am for my daily backups. Is there a special reason why you don't use the internal scheduler? Arno > Thanks for any help/insight you can provide. > Doug > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users -- IT-Service Lehmann [EMAIL PROTECTED] Arno Lehmann http://www.its-lehmann.de ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users