bareos-dbcopy [options] <sourcecatalog> <destinationcatalog>


bareos-dbcopy copies the data of all tables from the Bareos catalog <sourcecatalog> into the Bareos catalog <destinationcatalog>.

bareos-dbcopy reads the Bareos director configuration from /etc/bareos to load the catalog settings. A configuration resource for both <sourcecatalog> and <destinationcatalog> must exist.

The main use of bareos-dbcopy is to migrate an existing Bareos installation from mysql to postgresql.

bareos-dbcopy only copies the data over to the new catalog. The <destinationcatalog> needs to be created and initialized with the correct tables and columns via create_bareos_database, make_bareos_tables and grant_bareos_privileges.

Both sourcecatalog and destinationcatalog need to have the same database scheme version, i.e. have the schema from the identical Bareos version.

Internal workflow

  • bareos-dbcopy scans both the source and destination database for existing tables and column definitions.
  • For each table, each row is transferred from the source to the destination database. Depending on the column type, data filters are applied.
  • Tables exiting on the source side but not on the destination side are skipped.
  • If the destination table already contains data, the table is skipped.


-c <configuration directory>

bareos-dbcopy reads the director configuration from the given <configuration directory> instead of /etc/bareos


Prints usage information