3 rem This script dumps your Bacula catalog in ASCII format
\r
4 rem It works for MySQL, SQLite, and PostgreSQL
\r
6 rem %1 is the name of the database to be backed up and the name
\r
7 rem of the output file (default = bacula
\r
8 rem %2 is the user name with which to access the database
\r
9 rem (default = bacula).
\r
10 rem %3 is the password with which to access the database or "" if no password
\r
17 del /f bacula.sql 2>nul
\r
21 if not "%3"=="" set MYSQLPASSWORD=--password=%3
\r
22 "@SQL_BINDIR@\mysqldump" -u %2 %MYSQLPASSWORD% -f --opt %1 >%1.sql
\r
26 rem To read back a MySQL database use:
\r
27 rem cd @working_dir@
\r
28 rem rd /s /q -f @SQL_BINDIR@\..\data\bacula
\r
29 rem mysql <bacula.sql
\r
31 rem To read back a SQLite database use:
\r
32 rem cd @working_dir@
\r
34 rem sqlite bacula.db <bacula.sql
\r
36 rem To read back a PostgreSQL database use:
\r
37 rem cd @working_dir@
\r
40 rem psql bacula <bacula.sql
\r