This package provides images for Bareos database migratin from MySQL to PostgreSQL.
barcus/bareos-db-migration
latest
Since Bareos Version >= 21.0.0 the MySQL database backend is not shipped anymore. Therefore you need to use Bareos 20 to migrate an existing MySQL Bareos Catalog to PostgreSQL. To do so, upgrade to Bareos 20 first and then use this docker-compose file to backup (optional) the whole Bareos MySQL catalog and copy it into a new PostgreSQL catalog database.
If PostgreSQL database is empty or does not exist, it will be created.
Declare environment variables or copy the .env.dist
to .env
and adjust its
values.
Remember that all passwords should be defined inside this .env
file.
If DB_BACKUP
is set to true, MySQL database will be backup.
Read carefully this docker-compose file and update MySQL/PostgreSQL verion if required. Check PostgreSQL compatibilty information below.
docker-compose -f docker-compose.yml up
After sucessful migration, use the new folder /data/pgsql/data
and the
PostgreSQL version related in your docker-compose file.
At this moment, latest Ubuntu based images are compliant with PostgreSQL 12 or
less and Alpine ones with PostgreSQL 14. This is due to the version of pg_dump
which is required to dump Bareos database (catalog).
Ubuntu images:
- Bareos v19 -> PostgreSQL v10 or less
- Bareos v20+ -> PostgreSQL v12 or less
Alpine images:
- Bareos v19 -> PostgreSQL v13 or less
- Bareos v20+ -> PostgreSQL v14 or less
For more information visit the Github repositories :
- bareos-director-mysql
- bareos-director-pgsql
- bareos-storage
- bareos-client
- bareos-webui
- docker-ubuntu
- postgresql-upgrade
My Docker hub :
Enjoy !