0

While adding new client to bacula (v5.2.6, os Debian Wheezy) and testing configuration with bacula-dir -t -c bacula-dir.conf I'm getting:

bacula-dir: dird.c:954 Could not open Catalog "catalog-test1", database "test1". bacula-dir: dird.c:959 sqlite.c:182 Database /var/lib/bacula/test1.db does not exist, please create it.

EDIT: Bacula have already two working clients and the problem occurs while adding another one. The same version of bacula director an OS on another server (the same bacula daemons configuration, but the mysql db instead of sqlite3) let me add new clients without creating database for them manually. What should be done to get bacula to automatic catalog creation for new clients?

My Catalog definition for the client:

Catalog {
Name = catalog-test1
dbname = "test1"; dbuser = ""; dbpassword = ""
}

Any advice appreciated.

gaspar
  • 674
  • 2
  • 10
  • 24

1 Answers1

1

SQLite DB needs to be created and initialized before first use. It can be done by make commands during manual build or it can be done manually.

In my case (Gentoo Linux) these commands did the trick:

/usr/libexec/bacula/create_bacula_database
/usr/libexec/bacula/make_bacula_tables

See http://www.bacula.org/7.4.x-manuals/en/main/Installing_Configuring_SQLi.html for more details.

eNca
  • 1,043
  • 11
  • 21
  • That's right, before first use it should be created, but in my case bacula already have two clients and the problem occurs while adding a new one. In /var/lib/bacula/ there are .db and .bsr files for those two clients and I don't know what should I do to get these files for new client. Bacula with mysql creates it some how automatically, but in case of sqlite3 it is done in different way apparently. – gaspar Mar 26 '18 at 12:39