3 # This script dumps your Bacula catalog in ASCII format
\r
4 # It works for MySQL, SQLite, and PostgreSQL
\r
6 # $1 is the name of the database to be backed up and the name
\r
7 # of the output file (default = bacula
\r
8 # $2 is the user name with which to access the database
\r
9 # (default = bacula).
\r
10 # $3 is the password with which to access the database or "" if no password
\r
19 if "%3"!="" set MYSQLPASSWORD=" --password=%3"
\r
20 %SQL_BINDIR%/mysqldump -u %2 %MYSQLPASSWORD% -f --opt %1 >%1.sql
\r
23 # To read back a MySQL database use:
\r
25 # rm -f @SQL_BINDIR@/../var/bacula/*
\r
28 # To read back a SQLite database use:
\r
31 # sqlite bacula.db <bacula.sql
\r
33 # To read back a PostgreSQL database use:
\r
37 # psql bacula <bacula.sql
\r