0

I'm trying to figure out why I need so much space for backups using Bacula with SQLite and I've noticed this file: /var/lib/bacula/bacula.db measuring above 500MiB on all the directors. I presume that file also changes every time I run a backup, which means that is backed up in every daily backup.

My question is, should I back it up?

Pablo
  • 7,249
  • 25
  • 68
  • 83

1 Answers1

1

I guess you are using SQLite as a database? In this case, the file will be important for a speedy recovery from a total data loss, but it is not totally essential, as Bacula is capable of scanning all backup volumes to find all the current files, but this will take a significant amount of time, which you might not have when the Backup is needed.

You can configure Bacula to store the file on separate media and keep only one copy of it, making it much more efficient. This is defined somewhere in a group of FileSets and Jobs named around the word "Catalog" in your Bacula configuration.

Sven
  • 97,248
  • 13
  • 177
  • 225
  • The Catalog fileset, as it was by default, contains /var/lib/bacula/bacula.sql, not /var/lib/bacula/bacula.db. And yes, I'm using SQLite. – Pablo Apr 08 '11 at 09:05
  • a guess but - surely that's the sql that's used to create the db file, so the .db file isn't directly needed to be mentioned in the config files. – Sirex Apr 08 '11 at 09:11
  • The `BackupCatalog` job creates the .sql file from a `RunBeforeJob` script and deletes it afterwards, which is mainly done for external databases, I guess. In the default configuration of Bacula, `/var/lib/bacula` will be excluded from the default fileset with an `Exclude` rule, and the .sql file will be specifically targeted by the catalog job, so normally the `bacula.db` should not be part of any backup. Did you erase the `Exclude` line from the `Full Set` fileset? – Sven Apr 08 '11 at 09:13
  • @Sirex: No, this sql file is created as a database backup, as I said mainly for external databases like MySQL and PostgreSQL, during every backup job. – Sven Apr 08 '11 at 09:16