Catalog backup is broken in all default installs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bacula (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: bacula
When bacula is installed, the default is to use sqlite3, and the default configuration for this database (at least) is broken, with respect to the catalog backup job.
This error will always be returned:
19-May 23:11 theory-dir: RunBefore: /usr/bin/sqlite3: unknown option: -u<user>.db
19-May 23:11 theory-dir: RunBefore: Use -help for a list of options.
19-May 23:11 theory-dir: BackupCatalog.
Also, a (very difficult to remove) file "-u<user>.db" will be created in /var/lib/bacula. (I wasn't aware that backslash-escaping was broken in most shell commands (i.e. rm, mv, chmod) until I tried to remove this file. Go ahead, create one and try deleting it.)
The problem starts here, in the "BackupCatalog" job definition:
# Backup the catalog database (after the nightly save)
Job {
Name = "BackupCatalog"
JobDefs = "DefaultJob"
Level = Full
FileSet="Catalog"
Schedule = "WeeklyCycleAft
# This creates an ASCII copy of the catalog
RunBeforeJob = "/etc/bacula/
# This deletes the copy of the catalog
RunAfterJob = "/etc/bacula/
Write Bootstrap = "/var/lib/
Priority = 11 # run after main backup
}
The "RunBeforeJob" passes "-u<user>" as $1, and this is not what the sqlite3 case in that script expects.
Simply passing "bacula" instead of "-u<user> -p<password>" would fix this problem. So would modifying the make_catalog_backup script, by changing the case for sql to simply hardcode "bacula" for $1 (line 17).
Changed in bacula: | |
status: | In Progress → Fix Released |
We are in the process of rewriting make_catalog_backup