Migrate Catalog from Bacula 9.6.5-2 to bareos 19.2.7

38 views
Skip to first unread message

Toni Burger

unread,
Jul 29, 2020, 11:09:22 AM7/29/20
to bareos-users
Hi, 
i like to migrate from my existing bacula 9.6.5-2 to bareos 19.2.7. I'm using postgres for the catalog. 

I followed this howto: 

I'm aware, that my bacula version was not tested for upgrading. 

What I did so far: 
1) made a backup of my existing catalog
2) uninstall all bacula components
3) renamed user and group from bacula to bareos
4) renamed the postgres database/user, like described in the howto
5) installed bareos components
6) splitted up my bacula config to the bareos config files

Now, I tried to start the bareos-dir, which fails with the following error message: 

"Jul 29 16:10:05 storageSrv systemd[1]: Starting Bareos Director Daemon service...
Jul 29 16:10:05 storageSrv bareos-dir[22761]: bareos-dir: dird/check_catalog.cc:65-0 Could not open Catalog "MyCatalog", database "bareos".
Jul 29 16:10:05 storageSrv bareos-dir[22761]: bareos-dir: dird/check_catalog.cc:71-0 Version error for database "bareos". Wanted 2192, got 16
Jul 29 16:10:05 storageSrv bareos-dir[22761]: bareos-dir ERROR TERMINATION
Jul 29 16:10:05 storageSrv bareos-dir[22761]: Please correct the configuration in /etc/bareos/bareos-dir.d/*/*.conf
Jul 29 16:10:05 storageSrv systemd[1]: bareos-director.service: Can't open PID file /var/lib/bareos/bareos-dir.9101.pid (yet?) after start: Operation not permitted
Jul 29 16:10:05 storageSrv systemd[1]: Started Bareos Director Daemon service.
Jul 29 16:10:05 storageSrv systemd[1]: bareos-director.service: Succeeded.
"

It look likes, the catalog format is incompatible. I tried to run the update script, which also fails: 

:/usr/lib/bareos/scripts$ ./update_bareos_tables 
Updating postgresql tables
Don't know how to upgrade from version 16 to 2192


Is there some step, which I missed in between? Or is the catalog migration from bacula 9.6 simply not possible? 

As a last step, I could reinit a fresh database and try to build it up again, using bscan. But is there a better solution? 

Thanks. 
Toni

Oleg Volkov

unread,
Jul 29, 2020, 3:25:41 PM7/29/20
to bareos-users
I did upgrade from bareos to bareos using scratch new installation and migrating clients to it.
Once retention time becomes reasonable, I've dropped the old one.
I have no comments about your way, just mentioning another way proven be safety.

Toni Burger

unread,
Aug 3, 2020, 8:17:55 AM8/3/20
to bareos-users
Hi and thanks. 
I also did it this way and using the old director in parallel until all clients are migrated. 


Reply all
Reply to author
Forward
0 new messages