Hi Ana

I got failures with update_postgresql_tables script.
Please see my inline comments in your email below.
-Yateen

From: Ana Emília M. Arruda <emiliaarr...@gmail.com>
Sent: Tuesday, January 31, 2023 2:43 PM
To: Yateen Shaligram Bhagat (Nokia) <yateen.shaligram_bha...@nokia.com>
Cc: bacula-users@lists.sourceforge.net
Subject: Re: [Bacula-users] Bacula upgrade

Hello Yateen,

You should use the "postgres" user to run the update_postgresql_tables script.
[Yateen]  Ok, noted

As you have installed Bacula 13 from scratch in the new server, please remember 
to drop the bacula database created in a fresh install before importing the 
current DB using dump.

Then, you run the update_postgresql_tables script.

[Yateen]

  1.  I dropped the bacula database and tried to import the dump of Bacula 
9.4.4 Catalog. Got an error:

postgres@ubuntu:/opt/bacula/scripts$ psql -d bacula -f ~bacula/bacula.sql
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" 
failed: FATAL:  database "bacula" does not exist


  1.  So created bacula database using script create_postgresql_database
                            postgres@ubuntu:/opt/bacula/scripts$  
./create_postgresql_database
CREATE DATABASE
ALTER DATABASE
Creation of bacula database succeeded.
Database encoding OK


  1.  Then I imported Catalog dump from Bacula 9.4
                            psql -d bacula -f ~bacula/bacula.sql


  1.  Next, I ran update_postgresql_tables script
postgres@ubuntu:/opt/bacula/scripts$ ./update_postgresql_tables
This script will update a Bacula PostgreSQL database
                           from any from version 12-16 or 1014-1022 to version 
1024
                           which is needed to convert from any Bacula Communty 
to version 11.4.x
Dumping File table to /opt/bacula/scripts/file1017.data.

The process may fail if the current user
doesn't have write permission on the current directory,
or if the system doesn't have enough space to store a
compressed export of the File table
BEGIN
DROP TABLE
DROP TABLE
CREATE TABLE
COMMIT
Loading the File table from /opt/bacula/scripts/file.8520.data...
server closed the connection unexpectedly
              This probably means the server terminated abnormally
              before or while processing the request.
Inserting File data from file.8520.data failed.

Best,
Ana
On Tue, Jan 31, 2023 at 6:28 AM Yateen Shaligram Bhagat (Nokia) 
<yateen.shaligram_bha...@nokia.com<mailto:yateen.shaligram_bha...@nokia.com>> 
wrote:
Hello Ana,

Thanks for your reply.

Here is what I did...

1. Target for Bacula 13 upgrade is Ubuntu 22.4.
1. Installed postgresql 14 on Ubuntu 22.4
2. Installed  Bacula 13 using Deb package (dpkg command)
3. Dumped Bacula database from 9.4 installation (on CentOS 6)
4. Imported Bacula db dump into postgresql 14 on Ubuntu
5. Tried to start Bacula 13 director.
6. Got error message : Current Catalog version is 16, required version 1024.

Plz let me know the username through which i should run the 
upadate_postgresql_tables script, is it postgres user?

Regards,

Yateen



Get Outlook for Android<https://aka.ms/AAb9ysg>

________________________________
From: Ana Emília M. Arruda 
<emiliaarr...@gmail.com<mailto:emiliaarr...@gmail.com>>
Sent: Monday, 30 January, 2023, 23:27
To: Yateen Shaligram Bhagat (Nokia) 
<yateen.shaligram_bha...@nokia.com<mailto:yateen.shaligram_bha...@nokia.com>>
Cc: 
bacula-users@lists.sourceforge.net<mailto:bacula-users@lists.sourceforge.net> 
<bacula-users@lists.sourceforge.net<mailto:bacula-users@lists.sourceforge.net>>
Subject: Re: [Bacula-users] Bacula upgrade

Hello Yateen,

Have you already performed the upgrade? Have you checked if the Catalog version 
has been updated?
Can you please let us know which platform you are using?
I've checked the update_postgresql_tables script and it includes the upgrade 
from version 12-16 or 1014-1022 to 1024.
Are you using packages or compiling from source code?

Best,
Ana

On Mon, Jan 30, 2023 at 1:27 PM Yateen Shaligram Bhagat (Nokia) 
<yateen.shaligram_bha...@nokia.com<mailto:yateen.shaligram_bha...@nokia.com>> 
wrote:
Hi all,

Is it possible to upgrade bacula version 9.4 (catalog database version 16)  to 
version 13 (catalog database version 1024) directly as one step or any 
intermediate step upgrades are required?

I tried the direct upgrade, but there is no update_postgresql_tables script for 
database version 16 to 1024.

Please advise.

Thanks
Yateen S Bhagat
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net<mailto:Bacula-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/bacula-users

_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to