Re: [Bacula-users] Bacula Community Installation UPGRADE

2023-07-07 Thread Phil Stracchino

On 7/7/23 19:35, Phil Stracchino wrote:

Then re-update it again, but BEFORE you rerun the updater, find
update_mysql_tables_1021_to_1022 and change every instance of CREATE
TABLE to CREATE TABLE IF NOT EXISTS.  That will make sure that if
something else is happening along the way that is creating those tables
before they're expected, then the CREATE TABLE will be skipped, instead
of the script failing.



The *other* way you could do this is to insert a 'DROP TABLE IF EXISTS 
;' before each 'CREATE TABLE  (...' statement.



--
  Phil Stracchino
  Babylon Communications
  [email protected]
  [email protected]
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958



___
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula Community Installation UPGRADE

2023-07-07 Thread Phil Stracchino

On 7/7/23 19:26, Phil Stracchino wrote:

On 7/7/23 18:59, Ken Mandelberg wrote:

The suggestion below which is essentially to run "update_mysql_tables"
manually instead of within the

    "apt-get install bacula-mysql"

runs into the same issue. Specifically

Update of Bacula MySQL tables from 16 to 1017 succeeded.
Update of Bacula MySQL tables from 1017 to 1018 succeeded.
Update of Bacula MySQL tables 1018 to 1019 succeeded. (From 16)
Update of Bacula MySQL tables 1019 to 1020 succeeded.
Update of Bacula MySQL tables 1020 to 1021 succeeded.
ERROR 1050 (42S01) at line 3: Table 'TagJob' already exists
Update of Bacula MySQL tables 1021 to 1022 failed.

I also tried deleting TagJob and starting again, and then it just moves
on to the next table that already exists. In fact I deleted all the Tag*
tables, and that it complains about the Object table. I suspect it won't
like any.

Any ideas?
OK, the short version is none of those TAG tables are SUPPOSED to exist 
before database version 1022.  That PROBABLY means that you didn't fully 
clean from a prior update attempt.



So what you can do is drop your bacula DB, *make sure it's empty*, 
restore it again from your backup copy, connect to mysql, do a SHOW 
TABLES FROM bacula; and check that the Tag... and Event tables are not 
in that list.


Then re-update it again, but BEFORE you rerun the updater, find 
update_mysql_tables_1021_to_1022 and change every instance of CREATE 
TABLE to CREATE TABLE IF NOT EXISTS.  That will make sure that if 
something else is happening along the way that is creating those tables 
before they're expected, then the CREATE TABLE will be skipped, instead 
of the script failing.




--
  Phil Stracchino
  Babylon Communications
  [email protected]
  [email protected]
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958



___
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula Community Installation UPGRADE

2023-07-07 Thread Phil Stracchino

On 7/7/23 18:59, Ken Mandelberg wrote:

The suggestion below which is essentially to run "update_mysql_tables"
manually instead of within the

   "apt-get install bacula-mysql"

runs into the same issue. Specifically

Update of Bacula MySQL tables from 16 to 1017 succeeded.
Update of Bacula MySQL tables from 1017 to 1018 succeeded.
Update of Bacula MySQL tables 1018 to 1019 succeeded. (From 16)
Update of Bacula MySQL tables 1019 to 1020 succeeded.
Update of Bacula MySQL tables 1020 to 1021 succeeded.
ERROR 1050 (42S01) at line 3: Table 'TagJob' already exists
Update of Bacula MySQL tables 1021 to 1022 failed.

I also tried deleting TagJob and starting again, and then it just moves
on to the next table that already exists. In fact I deleted all the Tag*
tables, and that it complains about the Object table. I suspect it won't
like any.

Any ideas?



Let me take a look at the current update_mysql_tables script and get 
back to you.




--
  Phil Stracchino
  Babylon Communications
  [email protected]
  [email protected]
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958



___
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula Community Installation UPGRADE

2023-07-07 Thread Ken Mandelberg
The suggestion below which is essentially to run "update_mysql_tables" 
manually instead of within the


 "apt-get install bacula-mysql"

runs into the same issue. Specifically

Update of Bacula MySQL tables from 16 to 1017 succeeded.
Update of Bacula MySQL tables from 1017 to 1018 succeeded.
Update of Bacula MySQL tables 1018 to 1019 succeeded. (From 16)
Update of Bacula MySQL tables 1019 to 1020 succeeded.
Update of Bacula MySQL tables 1020 to 1021 succeeded.
ERROR 1050 (42S01) at line 3: Table 'TagJob' already exists
Update of Bacula MySQL tables 1021 to 1022 failed.

I also tried deleting TagJob and starting again, and then it just moves 
on to the next table that already exists. In fact I deleted all the Tag* 
tables, and that it complains about the Object table. I suspect it won't 
like any.


Any ideas?



On 7/4/23 19:48, Ken Mandelberg wrote:

> Another followup. One thing I learned, I need to remove all the Ubuntu
> bundled bacula 9 packages before doing? the apt-get install bacula-mysql
> for the Community 13 release, otherwise there are package conflicts.
>
> So after removing the old packages, apt-get install bacula-mysql tires
> to install the mysql bacula database. It gets caught at
>
> mysql said: ERROR 1050 (42S01) at line 9: Table 'TagJob' already exists
>
> I imagine if I removed that table it would just get caught at the 
next one.

>
> Its not really clear on how to proceed preserving the current database 9
> info and letting 13 do the update job.


OK, try this.

- DUMP the bacula schema using mysqldump or your database dump tool of
choice.  (Personally I prefer mydumper.)
- Then DROP the bacula DB.
- Then run apt-get install bacula-mysql.
- You MIGHT need to drop the bacula schema *again* at this point. to be
safe.
- Then RESTORE the bacula schema from your dump.
- Then run update_mysql_tables to update your v9 Bacula DB to v13.



___
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula Community Installation UPGRADE

2023-07-04 Thread Phil Stracchino

On 7/4/23 19:48, Ken Mandelberg wrote:

Another followup. One thing I learned, I need to remove all the Ubuntu
bundled bacula 9 packages before doing  the apt-get install bacula-mysql
for the Community 13 release, otherwise there are package conflicts.

So after removing the old packages, apt-get install bacula-mysql tires
to install the mysql bacula database. It gets caught at

mysql said: ERROR 1050 (42S01) at line 9: Table 'TagJob' already exists

I imagine if I removed that table it would just get caught at the next one.

Its not really clear on how to proceed preserving the current database 9
info and letting 13 do the update job.



OK, try this.

- DUMP the bacula schema using mysqldump or your database dump tool of 
choice.  (Personally I prefer mydumper.)

- Then DROP the bacula DB.
- Then run apt-get install bacula-mysql.
- You MIGHT need to drop the bacula schema *again* at this point. to be 
safe.

- Then RESTORE the bacula schema from your dump.
- Then run update_mysql_tables to update your v9 Bacula DB to v13.


That should put you where you need to be, and in the worst case, you 
have a dump of your bacula DB in the event you have to roll back.





--
  Phil Stracchino
  Babylon Communications
  [email protected]
  [email protected]
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958



___
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula Community Installation UPGRADE

2023-07-04 Thread Rob Gerber
Was the mysql database for bacula 9 used in production, and/or is there
anything important in there? If not, remove the bacula 9 packages and
dependencies with the apt purge command (look up syntax). This will remove
configuration files and things created by the removed packages.

Might have to reinstall the bacula 9 packages then do a purge, can't recall
from when I encountered this.

If you have production data in the bacula 9 catalog, or need to retain an
unrelated mysql database better double check with the people here on this
list.

Robert Gerber
402-237-8692
[email protected]

On Tue, Jul 4, 2023, 6:49 PM Ken Mandelberg  wrote:

> Another followup. One thing I learned, I need to remove all the Ubuntu
> bundled bacula 9 packages before doing  the apt-get install bacula-mysql
> for the Community 13 release, otherwise there are package conflicts.
>
> So after removing the old packages, apt-get install bacula-mysql tires
> to install the mysql bacula database. It gets caught at
>
> mysql said: ERROR 1050 (42S01) at line 9: Table 'TagJob' already exists
>
> I imagine if I removed that table it would just get caught at the next one.
>
> Its not really clear on how to proceed preserving the current database 9
> info and letting 13 do the update job.
>
>
> Ken Mandelberg wrote on 7/1/23 18:30:
> > This is a followup of my previous posts. I'm doing an upgrade from
> > Bacula 9 to 13 on Ubuntu 23.04. I realize there is no specific support
> > for 23.04 so I'm making believe I'm on Jammy.
> >
> > I've gotten past the apt-key issue and sources are set up, and apt-get
> > update has succeeded. Now my question is about the next step dealing
> > with the fact that this is an upgrade of a working Bacula 9
> > installation. (Don't worry, its really on a test machine before I try
> > it on a production machine).
> >
> > So I know I need to copy /etc/bacula to a safe place. Should I also
> > delete it?
> >
> > I will also stop director , sd, and fd. and move those binaries out of
> > the way.
> >
> > I'm running mysql. Should I do anything there to the existing bacula
> > data base?
> >
> > Assuming the answers to those the next stop is
> >
> > apt-get install bacula-mysql
> >
> > I would assume I then copy back the saved /etc/bacula back in place
> > and then start the new binaries.
> >
> > What about updating the mysql tables from 9 to 13? Where does that
> > happen.
> >
> > Sorry for all the needy questions. This is my first time not using the
> > bundled Ubuntu package support for Bacula  which handles updates
> > transparently. Debian/Ubuntu has no Bacula maintainer now.
> >
> > ---
> >
> > Side issue about the Documentation, what is the "concatenate" note
> > about. It makes no sense, deb would just be an ignored comment.
> >
> > Complete example:
> >
> > #Bacula Community
> > deb [arch=amd64]
> > https://www.bacula.org/packages/abc123defxxxyyy/debs/13.0.1 xenial main
> >
> > Note 1: please concatenate the last 2 lines into 1 line.
> >
>
>
>
> ___
> Bacula-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
___
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula Community Installation UPGRADE

2023-07-04 Thread Ken Mandelberg
Another followup. One thing I learned, I need to remove all the Ubuntu 
bundled bacula 9 packages before doing  the apt-get install bacula-mysql 
for the Community 13 release, otherwise there are package conflicts.


So after removing the old packages, apt-get install bacula-mysql tires 
to install the mysql bacula database. It gets caught at


mysql said: ERROR 1050 (42S01) at line 9: Table 'TagJob' already exists

I imagine if I removed that table it would just get caught at the next one.

Its not really clear on how to proceed preserving the current database 9 
info and letting 13 do the update job.



Ken Mandelberg wrote on 7/1/23 18:30:
This is a followup of my previous posts. I'm doing an upgrade from 
Bacula 9 to 13 on Ubuntu 23.04. I realize there is no specific support 
for 23.04 so I'm making believe I'm on Jammy.


I've gotten past the apt-key issue and sources are set up, and apt-get 
update has succeeded. Now my question is about the next step dealing 
with the fact that this is an upgrade of a working Bacula 9 
installation. (Don't worry, its really on a test machine before I try 
it on a production machine).


So I know I need to copy /etc/bacula to a safe place. Should I also 
delete it?


I will also stop director , sd, and fd. and move those binaries out of 
the way.


I'm running mysql. Should I do anything there to the existing bacula 
data base?


Assuming the answers to those the next stop is

apt-get install bacula-mysql

I would assume I then copy back the saved /etc/bacula back in place 
and then start the new binaries.


What about updating the mysql tables from 9 to 13? Where does that 
happen.


Sorry for all the needy questions. This is my first time not using the 
bundled Ubuntu package support for Bacula  which handles updates 
transparently. Debian/Ubuntu has no Bacula maintainer now.


---

Side issue about the Documentation, what is the "concatenate" note 
about. It makes no sense, deb would just be an ignored comment.


Complete example:

#Bacula Community
deb [arch=amd64] 
https://www.bacula.org/packages/abc123defxxxyyy/debs/13.0.1 xenial main


Note 1: please concatenate the last 2 lines into 1 line.





___
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula Community Installation UPGRADE

2023-07-01 Thread ben . tyger
Just as an FYI, bacula 13.x drops Ubuntu 18.04 support. If you still have some 
servers running that stick with 11.

On July 1, 2023 6:30:59 PM EDT, Ken Mandelberg  wrote:
>This is a followup of my previous posts. I'm doing an upgrade from Bacula 9 to 
>13 on Ubuntu 23.04. I realize there is no specific support for 23.04 so I'm 
>making believe I'm on Jammy.
>
>I've gotten past the apt-key issue and sources are set up, and apt-get update 
>has succeeded. Now my question is about the next step dealing with the fact 
>that this is an upgrade of a working Bacula 9 installation. (Don't worry, its 
>really on a test machine before I try it on a production machine).
>
>So I know I need to copy /etc/bacula to a safe place. Should I also delete it?
>
>I will also stop director , sd, and fd. and move those binaries out of the way.
>
>I'm running mysql. Should I do anything there to the existing bacula data base?
>
>Assuming the answers to those the next stop is
>
>apt-get install bacula-mysql
>
>I would assume I then copy back the saved /etc/bacula back in place and then 
>start the new binaries.
>
>What about updating the mysql tables from 9 to 13? Where does that happen.
>
>Sorry for all the needy questions. This is my first time not using the bundled 
>Ubuntu package support for Bacula  which handles updates transparently. 
>Debian/Ubuntu has no Bacula maintainer now.
>
>---
>
>Side issue about the Documentation, what is the "concatenate" note about. It 
>makes no sense, deb would just be an ignored comment.
>
>Complete example:
>
>#Bacula Community
>deb [arch=amd64] https://www.bacula.org/packages/abc123defxxxyyy/debs/13.0.1 
>xenial main
>
>Note 1: please concatenate the last 2 lines into 1 line.
>
>
>
>___
>Bacula-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.___
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula Community Installation UPGRADE

2023-07-01 Thread Phil Stracchino

On 7/1/23 18:30, Ken Mandelberg wrote:

So I know I need to copy /etc/bacula to a safe place. Should I also
delete it?


No, don't do that, you want to keep your configuration.  If you delete 
those files you'll lose it.



I will also stop director , sd, and fd. and move those binaries out of
the way.


You shouldn't need to do that.  Let the package system handle it.


I'm running mysql. Should I do anything there to the existing bacula
data base?


See below.


Assuming the answers to those the next stop is

apt-get install bacula-mysql

I would assume I then copy back the saved /etc/bacula back in place and
then start the new binaries.

What about updating the mysql tables from 9 to 13? Where does that happen.


The update-mysql-tables script will take care of that for you.  Run it 
BEFORE you start the new Director.




--
  Phil Stracchino
  Babylon Communications
  [email protected]
  [email protected]
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958



___
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula Community Installation UPGRADE

2023-07-01 Thread Rob Gerber
Ken,

No worries.

I don't have them in front of me, but I'd bet the release notes for bacula
13.x (whatever your version will be, prob 13.0.3) will have info on any
needed upgrade steps. I suspect it'll handle the database transparently
based on my limited recollection from when I browsed said notes earlier
this week. Find the relevant release notes on the bacula website.

Regarding the concatenate note, I suspect they mean to make sure the text
in brackets is all on one line with the URL.

Robert Gerber
402-237-8692
[email protected]

On Sat, Jul 1, 2023, 5:53 PM Ken Mandelberg  wrote:

> This is a followup of my previous posts. I'm doing an upgrade from
> Bacula 9 to 13 on Ubuntu 23.04. I realize there is no specific support
> for 23.04 so I'm making believe I'm on Jammy.
>
> I've gotten past the apt-key issue and sources are set up, and apt-get
> update has succeeded. Now my question is about the next step dealing
> with the fact that this is an upgrade of a working Bacula 9
> installation. (Don't worry, its really on a test machine before I try it
> on a production machine).
>
> So I know I need to copy /etc/bacula to a safe place. Should I also
> delete it?
>
> I will also stop director , sd, and fd. and move those binaries out of
> the way.
>
> I'm running mysql. Should I do anything there to the existing bacula
> data base?
>
> Assuming the answers to those the next stop is
>
> apt-get install bacula-mysql
>
> I would assume I then copy back the saved /etc/bacula back in place and
> then start the new binaries.
>
> What about updating the mysql tables from 9 to 13? Where does that happen.
>
> Sorry for all the needy questions. This is my first time not using the
> bundled Ubuntu package support for Bacula  which handles updates
> transparently. Debian/Ubuntu has no Bacula maintainer now.
>
> ---
>
> Side issue about the Documentation, what is the "concatenate" note
> about. It makes no sense, deb would just be an ignored comment.
>
> Complete example:
>
> #Bacula Community
> deb [arch=amd64]
> https://www.bacula.org/packages/abc123defxxxyyy/debs/13.0.1 xenial main
>
> Note 1: please concatenate the last 2 lines into 1 line.
>
>
>
> ___
> Bacula-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
___
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users