Hi, i need to backup a postgresql database. This database is not the catalog
database, but another database that i want to backup. It is possibile to
automate this backup with bacula?
I take a look into /etc/bacula/sripts/make_catalog_backup, i think to create
a similar script, something like this:
exec ${BINDIR}/pg_dump -c $PGHOST -U ${DB_USERNAME} ${DB_NAME}
>${DB_NAME}.sql
And create a job like this:
Job {
Name = "BackupPostgresqlDataBase"
JobDefs = "DefaultJob"
Level = Full
FileSet="Database"
Schedule = "WeeklyCycleAfterBackup"
RunBeforeJob = "/etc/bacula/scripts/make_database_backup"
# RunAfterJob = "/etc/bacula/scripts/delete_database_backup"
Write Bootstrap = "/var/lib/bacula/BackupDatabase.bsr"
Priority = 11
}
FileSet {
Name = "Database"
Include {
Options {
signature = MD5
}
File = /var/lib/bacula/database.sql
}
}
I copy the RunAfetJob line from the default catalog backup job, but i don't
understand it. If before the job the script dumps the database, and after
the file is deleted, what's the point? I don't get it.
The delete_database_backup script is a copy of the default
delete_catalog_backup, which only do this: rm -f
/var/lib/bacula/${db_name}.sql
There is any better way to do this?
Thank you.
Regards
Marco Zancanaro
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users