> This has been happening since I updated to 1.36.3
> 
> 10-Jun 00:27 msslas-dir: RunBefore: /usr/bin/mysqldump: 
> option requires an argument -- u 10-Jun 00:27 msslas-dir: 
> Start Backup JobId 5119, Job=BackupCatalog.2005-06-09_23.50.00
> 10-Jun 00:27 msslas-sd: Spooling data ...
> 10-Jun 00:27 msslas-fd:      Could not stat 
> /var/bacula/working/bacula.sql: 
> ERR=No such file or directory
> 
> # Backup the catalog database (after the nightly save) Job {
>    Name = "BackupCatalog"
>    JobDefs = "DefaultJob"
>    Level = Full
>    FileSet="Catalog"
>    Schedule = "WeeklyCycleAfterBackup"
>    # This creates an ASCII copy of the catalog
>    RunBeforeJob = "/etc/bacula/make_catalog_backup -u bacula"
>    # This deletes the copy of the catalog
>    RunAfterJob  = "/etc/bacula/delete_catalog_backup"
>    Write Bootstrap = "/var/bacula/working/BackupCatalog.bsr"
>    Priority = 11                   # run after main backup
>    Pool = High-churnPool
> }
> 
> The relevant section of the script is:
> 
> cd /var/bacula/working
> rm -f bacula.sql
> if test xsqlite = xmysql ; then
>    echo ".dump" | /usr/bin/sqlite $1.db >$1.sql else
>    if test xmysql = xmysql ; then
>      /usr/bin/mysqldump -u $2 -f --opt $1 >$1.sql
>    else
>      /usr/bin/pg_dump -U $2 $1 >$1.sql
>    fi
> fi
> 
> 
> Any pointers?
> 

RunBeforeJob = "/etc/bacula/make_catalog_backup bacula bacula"

Notice that the script uses $1 as db name and $2 as user.
Furthermore if your db requires a password (like mines does) you can use:
RunBeforeJob = "/etc/bacula/make_catalog_backup bacula \"bacula
--password=yourdbpasswd\""
Just note the escaped quotes.

> AB
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.  How far 
> can you shotput a projector? How fast can you ride your desk 
> chair down the office luge track?
> If you want to score the big prize, get to know the little guy.  
> Play to win an NEC 61" plasma display: 
> http://www.necitguy.com/?r=20 
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to