Re: [Bacula-users] make_catalog_backup stopped working
On 12/28/21 11:33, Graham Dicker wrote: Looking good. A full backup completed and make_catalog_backup performed flawlessly, which was the original problem. All done manually. Tomorrow morning it'll be back on automatic and I have every expectation that when I finish breakfast there will be emails waiting for me reporting successful backups. I can't tell you how grateful I am for all the help from Graham Sparks, Phil Stracchino and Josip Deanovic. Thank you very much guys, ever in your debt. Glad to hear everything is working as it should be now. -- Phil Stracchino Babylon Communications ph...@caerllewys.net p...@co.ordinate.org Landline: +1.603.293.8485 Mobile: +1.603.998.6958 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-28 17:33, Graham Dicker wrote: Looking good. A full backup completed and make_catalog_backup performed flawlessly, which was the original problem. All done manually. Tomorrow morning it'll be back on automatic and I have every expectation that when I finish breakfast there will be emails waiting for me reporting successful backups. I can't tell you how grateful I am for all the help from Graham Sparks, Phil Stracchino and Josip Deanovic. Thank you very much guys, ever in your debt. Glad to hear it worked for you. Regards! -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
Looking good. A full backup completed and make_catalog_backup performed flawlessly, which was the original problem. All done manually. Tomorrow morning it'll be back on automatic and I have every expectation that when I finish breakfast there will be emails waiting for me reporting successful backups. I can't tell you how grateful I am for all the help from Graham Sparks, Phil Stracchino and Josip Deanovic. Thank you very much guys, ever in your debt. Graham ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-28 14:18, Graham Dicker wrote: On Tuesday, 28 December 2021 12:03:05 GMT Josip Deanovic wrote: > Is dropping user bacula the action that emptied all the Bacula tables > of data? > I know very little about the behaviour of mysql. Anyway, the tables > were still > there but empty so I created a new volume and Bacula is now happily > backing up > to it. It will take some hours yet to finish that. Ok, so everything is in order now? Dropping user using "drop user" command in mysql client wouldn't cause deletion or truncation of data from the tables. I just did "drop user bacula" and that only removed row from mysql.user table that looked like: Host | User --+--- % | bacula When I issued the command "drop user 'bacula'@'localhost', the other row containing bacula user password was deleted as well: Host | User --+--- localhost | bacula Tables and the data inside the tables were left intact as it should be. I was mistaken. The data from my backups going back for months is still all there and I can see it using mysql. Using bconsole Bacula can see the tables (or did it create new ones?) but not the data in them. That's why it told me it needed a new volume. If you performed import of the data at some point, this is what created the tables (and probably populated them with the data unless the backup didn't contain the data). It all depends on exact actions you performed. Remember that you have been using dedicated akonadi mysql instance which kept the data in the /home/graham/.local/share/akonadi/db_data/ directory. Now your mysql instance keeps the data in the /var/lib/mysql which is the default for most Linux distributions and MySQL installations. -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On Tuesday, 28 December 2021 12:03:05 GMT Josip Deanovic wrote: > > Is dropping user bacula the action that emptied all the Bacula tables > > of data? > > I know very little about the behaviour of mysql. Anyway, the tables > > were still > > there but empty so I created a new volume and Bacula is now happily > > backing up > > to it. It will take some hours yet to finish that. > > Ok, so everything is in order now? > > > Dropping user using "drop user" command in mysql client > wouldn't cause deletion or truncation of data from the > tables. > > I just did "drop user bacula" and that only removed > row from mysql.user table that looked like: > Host | User > --+--- > % | bacula > > When I issued the command "drop user 'bacula'@'localhost', > the other row containing bacula user password was deleted > as well: > Host | User > --+--- > localhost | bacula > > Tables and the data inside the tables were left intact > as it should be. I was mistaken. The data from my backups going back for months is still all there and I can see it using mysql. Using bconsole Bacula can see the tables (or did it create new ones?) but not the data in them. That's why it told me it needed a new volume. Graham ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-28 12:41, Graham Dicker wrote: On Tuesday, 28 December 2021 11:21:19 GMT Josip Deanovic wrote: Could send the output of this command: mysql -u root -e "show databases; show variables where variable_name='datadir' or variable_name='socket';" This will output all your databases and in addition, it will output the datadir and the socket your mysql is using. This will help us to determine that you are indeed not using akonadi instance. If everything is ok you would just need to enter the correct database credentials into the bacula-dir.conf and there should be no problems. Instead of dbaddress you would just need to specify dbsocket. If you don't specify dbsocket, bacula will use the default mysql socket which might nor might not be the correct path for your mysql instance (depending on the mysql setup). .++ .| Database | .++ .| bacula | .| information_schema | .| mysql | .| performance_schema | .| test | .++ .+---+---+ .| Variable_name | Value | .+---+---+ .| datadir | /var/lib/mysql/ | .| socket| /run/mysql/mysql.sock | .+---+---+ Ok, everything looks good here. This is the correct mysql instance and not the one dedicated to akonadi. Is dropping user bacula the action that emptied all the Bacula tables of data? I know very little about the behaviour of mysql. Anyway, the tables were still there but empty so I created a new volume and Bacula is now happily backing up to it. It will take some hours yet to finish that. Ok, so everything is in order now? Dropping user using "drop user" command in mysql client wouldn't cause deletion or truncation of data from the tables. I just did "drop user bacula" and that only removed row from mysql.user table that looked like: Host | User --+--- % | bacula When I issued the command "drop user 'bacula'@'localhost', the other row containing bacula user password was deleted as well: Host | User --+--- localhost | bacula Tables and the data inside the tables were left intact as it should be. -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On Tuesday, 28 December 2021 11:21:19 GMT Josip Deanovic wrote: > Could send the output of this command: > > mysql -u root -e "show databases; show variables where > variable_name='datadir' or variable_name='socket';" > > > This will output all your databases and in addition, it will > output the datadir and the socket your mysql is using. > This will help us to determine that you are indeed not > using akonadi instance. > > If everything is ok you would just need to enter the correct > database credentials into the bacula-dir.conf and there should > be no problems. > Instead of dbaddress you would just need to specify dbsocket. > If you don't specify dbsocket, bacula will use the default > mysql socket which might nor might not be the correct path > for your mysql instance (depending on the mysql setup). .++ .| Database | .++ .| bacula | .| information_schema | .| mysql | .| performance_schema | .| test | .++ .+---+---+ .| Variable_name | Value | .+---+---+ .| datadir | /var/lib/mysql/ | .| socket| /run/mysql/mysql.sock | .+---+---+ Is dropping user bacula the action that emptied all the Bacula tables of data? I know very little about the behaviour of mysql. Anyway, the tables were still there but empty so I created a new volume and Bacula is now happily backing up to it. It will take some hours yet to finish that. Graham ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-28 11:20, Graham Dicker wrote: On Tuesday, 28 December 2021 09:31:46 GMT Josip Deanovic wrote: Could you please send the output of this command: ps auxww | grep -i mysql Yes of course - see below. But the mariadb service actually starts on boot. akonadi doesn't start at all until I run KMail, at which point it presumably connects to the already running mariadb/mysqldb. I have to do that because I need to have Bacula running long before I get out of bed and use KMail ;-). Of course. :-) mysql 1263 0.0 1.6 1595128 128768 ? Ssl 08:41 0:00 /usr/sbin/ mysqld --defaults-file=/etc/my.cnf --user=mysql graham2511 0.0 1.5 2484768 123896 ? Sl 08:43 0:01 /usr/sbin/ mysqld --defaults-file=/home/graham/.local/share/akonadi/mysql.conf -- datadir=/home/graham/.local/share/akonadi/db_data/ --socket=/run/user/1000/ akonadi/mysql.socket --pid-file=/run/user/1000/akonadi/mysql.pid That shows that there are two mysql instances as it should be. One is started by akonadi and the other by the system (user mysql). That is ok and this is how it should be. As I thought, akonadi is using its own mysql config file and its own datadir. This is ok. Could send the output of this command: mysql -u root -e "show databases; show variables where variable_name='datadir' or variable_name='socket';" This will output all your databases and in addition, it will output the datadir and the socket your mysql is using. This will help us to determine that you are indeed not using akonadi instance. If everything is ok you would just need to enter the correct database credentials into the bacula-dir.conf and there should be no problems. Instead of dbaddress you would just need to specify dbsocket. If you don't specify dbsocket, bacula will use the default mysql socket which might nor might not be the correct path for your mysql instance (depending on the mysql setup). -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On Tuesday, 28 December 2021 09:31:46 GMT Josip Deanovic wrote: > On 2021-12-28 10:23, Graham Dicker wrote: > > On Monday, 27 December 2021 18:56:32 GMT Phil Stracchino wrote: > >> On 12/27/21 13:38, Graham Dicker wrote: > >> > On Monday, 27 December 2021 18:19:23 GMT Phil Stracchino wrote: > >> > > The blazes? If mysql.user is a VIEW, something is VERY BADLY > >> > > WRONG. > >> > > Are you still using Akonadi's MySQL instance? > >> > > >> > Not as far as I can tell. I changed /etc/my.cnf to say: > >> > > >> > port = 3306 > >> > >> And you are certain that the mysqld listening on that port is NOT > >> Akonadi's? > >> > >> If Akonadi's mysqld is listening on port 3306, and you install a > >> second > >> mysqld, it will be unable to bind port 3306. You cannot have two > >> different processes listening on the same port. > >> > >> Try this command as root: lsof -i | grep 3306 > >> > >> and see which mysql process is listening on that port. Then look at > >> the > >> process tree (ps axf) and see what that process belongs to. > > > > The command > > > > lsof -i | grep 3306 > > > > as root returns nothing > > > > lsof -i -U | grep mysql > > > > returns this > > > > COMMANDPID USER FD TYPE DEVICE SIZE/OFF NODE > > NAME > > mysqld1263 mysql 58u IPv4 35060 0t0 TCP > > localhost:mysql (LISTEN) > > mysqld1263 mysql 59u unix 0x8c5c0484e600 0t0 35061 > > /run/ > > mysql/mysql.sock type=STREAM > > mysqld1263 mysql 102u unix 0x8c5b56e50cc0 0t0 65617 > > /run/ > > mysql/mysql.sock type=STREAM > > mysqld2511 graham 17u unix 0x8c5bce1d72c0 0t0 39643 > > /run/ > > user/1000/akonadi/mysql.socket type=STREAM > > mysqld2511 graham 26u unix 0x8c5bdbc69540 0t0 39665 > > /run/ > > user/1000/akonadi/mysql.socket type=STREAM > > mysqld2511 graham 123u unix 0x8c5bdbc6aa80 0t0 40731 > > /run/ > > user/1000/akonadi/mysql.socket type=STREAM > > mysqld2511 graham 124u unix 0x8c5bce1d2640 0t0 39676 > > /run/ > > user/1000/akonadi/mysql.socket type=STREAM > > mysqld2511 graham 125u unix 0x8c5bb77e4c80 0t0 43085 > > /run/ > > user/1000/akonadi/mysql.socket type=STREAM > > mysqld2511 graham 126u unix 0x8c5b60ce0440 0t0 66284 > > /run/ > > user/1000/akonadi/mysql.socket type=STREAM > > mysqld2511 graham 138u unix 0x8c5c05025d80 0t0 51606 > > /run/ > > user/1000/akonadi/mysql.socket type=STREAM > > mysql 3666 root3u unix 0x8c5b56e550c0 0t0 60155 > > type=STREAM > > > > poking about in the process tree returns lots of cryptic commands. The > > number > > 3306 doesn't feature anywhere except /etc/my.cnf and bacula-dir.conf > > even > > though I'm running mysql, KMail and Bacula at the time. > > It would seem that you are not running "normal" mysql service. > It seems that you are running only the one started by akonadi. > > Could you please send the output of this command: > ps auxww | grep -i mysql Yes of course - see below. But the mariadb service actually starts on boot. akonadi doesn't start at all until I run KMail, at which point it presumably connects to the already running mariadb/mysqldb. I have to do that because I need to have Bacula running long before I get out of bed and use KMail ;-). mysql 1263 0.0 1.6 1595128 128768 ? Ssl 08:41 0:00 /usr/sbin/ mysqld --defaults-file=/etc/my.cnf --user=mysql graham2511 0.0 1.5 2484768 123896 ? Sl 08:43 0:01 /usr/sbin/ mysqld --defaults-file=/home/graham/.local/share/akonadi/mysql.conf -- datadir=/home/graham/.local/share/akonadi/db_data/ --socket=/run/user/1000/ akonadi/mysql.socket --pid-file=/run/user/1000/akonadi/mysql.pid Graham ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On Monday, 27 December 2021 19:47:40 GMT Josip Deanovic wrote: > On 2021-12-27 19:38, Graham Dicker wrote: > > On Monday, 27 December 2021 18:19:23 GMT Phil Stracchino wrote: > >> On 12/27/21 12:10, Josip Deanovic wrote: > >> > On 2021-12-27 14:24, Graham Dicker wrote: > >> >> I can't get those commands to work > >> >> > >> >> MariaDB [mysql]> CREATE USER 'bacula'@'localhost' IDENTIFIED BY 'xxx'; > >> >> ERROR 1396 (HY000): Operation CREATE USER failed for > >> >> 'bacula'@'localhost' > >> >> MariaDB [mysql]> UPDATE mysql.user SET Host='localhost' WHERE > >> >> User='bacula'; > >> >> ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or > >> >> column(s) > >> > >> The blazes? If mysql.user is a VIEW, something is VERY BADLY > >> WRONG. > >> > >> Are you still using Akonadi's MySQL instance? > > > > Not as far as I can tell. I changed /etc/my.cnf to say: > > port = 3306 > > > > I realized (eventually) that I couldn't create another user bacula > > without dropping the > > existing one first. So I dropped user bacula but now I can't create it > > again. > > > > create user 'bacula2'@'localhost'; > > > > works but > > > > create user 'bacula'@'localhost'; > > > > results in > > > > ERROR 1396 (HY000): Operation CREATE USER failed for > > 'bacula'@'localhost' > > Did you use drop user or did you manually remove user from > the user table in the mysql database? > > If you manually deleted user from the mysql database, you > need to issue the command: flush privileges; I used drop user. This morning I did the flush privileges command and tried the create user again. It worked this time and Bacula runs OK. Only snag is that this incarnation of bacula can't use the database created by the previous bacula. Never mind. I will try making a backup and if I have to new volumes so be it. Graham ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-28 10:23, Graham Dicker wrote: On Monday, 27 December 2021 18:56:32 GMT Phil Stracchino wrote: On 12/27/21 13:38, Graham Dicker wrote: > On Monday, 27 December 2021 18:19:23 GMT Phil Stracchino wrote: > > The blazes? If mysql.user is a VIEW, something is VERY BADLY > > WRONG. > > Are you still using Akonadi's MySQL instance? > > Not as far as I can tell. I changed /etc/my.cnf to say: > > port = 3306 And you are certain that the mysqld listening on that port is NOT Akonadi's? If Akonadi's mysqld is listening on port 3306, and you install a second mysqld, it will be unable to bind port 3306. You cannot have two different processes listening on the same port. Try this command as root: lsof -i | grep 3306 and see which mysql process is listening on that port. Then look at the process tree (ps axf) and see what that process belongs to. The command lsof -i | grep 3306 as root returns nothing lsof -i -U | grep mysql returns this COMMANDPID USER FD TYPE DEVICE SIZE/OFF NODE NAME mysqld1263 mysql 58u IPv4 35060 0t0 TCP localhost:mysql (LISTEN) mysqld1263 mysql 59u unix 0x8c5c0484e600 0t0 35061 /run/ mysql/mysql.sock type=STREAM mysqld1263 mysql 102u unix 0x8c5b56e50cc0 0t0 65617 /run/ mysql/mysql.sock type=STREAM mysqld2511 graham 17u unix 0x8c5bce1d72c0 0t0 39643 /run/ user/1000/akonadi/mysql.socket type=STREAM mysqld2511 graham 26u unix 0x8c5bdbc69540 0t0 39665 /run/ user/1000/akonadi/mysql.socket type=STREAM mysqld2511 graham 123u unix 0x8c5bdbc6aa80 0t0 40731 /run/ user/1000/akonadi/mysql.socket type=STREAM mysqld2511 graham 124u unix 0x8c5bce1d2640 0t0 39676 /run/ user/1000/akonadi/mysql.socket type=STREAM mysqld2511 graham 125u unix 0x8c5bb77e4c80 0t0 43085 /run/ user/1000/akonadi/mysql.socket type=STREAM mysqld2511 graham 126u unix 0x8c5b60ce0440 0t0 66284 /run/ user/1000/akonadi/mysql.socket type=STREAM mysqld2511 graham 138u unix 0x8c5c05025d80 0t0 51606 /run/ user/1000/akonadi/mysql.socket type=STREAM mysql 3666 root3u unix 0x8c5b56e550c0 0t0 60155 type=STREAM poking about in the process tree returns lots of cryptic commands. The number 3306 doesn't feature anywhere except /etc/my.cnf and bacula-dir.conf even though I'm running mysql, KMail and Bacula at the time. It would seem that you are not running "normal" mysql service. It seems that you are running only the one started by akonadi. Could you please send the output of this command: ps auxww | grep -i mysql -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On Monday, 27 December 2021 18:56:32 GMT Phil Stracchino wrote: > On 12/27/21 13:38, Graham Dicker wrote: > > On Monday, 27 December 2021 18:19:23 GMT Phil Stracchino wrote: > > > The blazes? If mysql.user is a VIEW, something is VERY BADLY > > > WRONG. > > > Are you still using Akonadi's MySQL instance? > > > > Not as far as I can tell. I changed /etc/my.cnf to say: > > > > port = 3306 > > And you are certain that the mysqld listening on that port is NOT Akonadi's? > > If Akonadi's mysqld is listening on port 3306, and you install a second > mysqld, it will be unable to bind port 3306. You cannot have two > different processes listening on the same port. > > Try this command as root: lsof -i | grep 3306 > > and see which mysql process is listening on that port. Then look at the > process tree (ps axf) and see what that process belongs to. > The command lsof -i | grep 3306 as root returns nothing lsof -i -U | grep mysql returns this COMMANDPID USER FD TYPE DEVICE SIZE/OFF NODE NAME mysqld1263 mysql 58u IPv4 35060 0t0 TCP localhost:mysql (LISTEN) mysqld1263 mysql 59u unix 0x8c5c0484e600 0t0 35061 /run/ mysql/mysql.sock type=STREAM mysqld1263 mysql 102u unix 0x8c5b56e50cc0 0t0 65617 /run/ mysql/mysql.sock type=STREAM mysqld2511 graham 17u unix 0x8c5bce1d72c0 0t0 39643 /run/ user/1000/akonadi/mysql.socket type=STREAM mysqld2511 graham 26u unix 0x8c5bdbc69540 0t0 39665 /run/ user/1000/akonadi/mysql.socket type=STREAM mysqld2511 graham 123u unix 0x8c5bdbc6aa80 0t0 40731 /run/ user/1000/akonadi/mysql.socket type=STREAM mysqld2511 graham 124u unix 0x8c5bce1d2640 0t0 39676 /run/ user/1000/akonadi/mysql.socket type=STREAM mysqld2511 graham 125u unix 0x8c5bb77e4c80 0t0 43085 /run/ user/1000/akonadi/mysql.socket type=STREAM mysqld2511 graham 126u unix 0x8c5b60ce0440 0t0 66284 /run/ user/1000/akonadi/mysql.socket type=STREAM mysqld2511 graham 138u unix 0x8c5c05025d80 0t0 51606 /run/ user/1000/akonadi/mysql.socket type=STREAM mysql 3666 root3u unix 0x8c5b56e550c0 0t0 60155 type=STREAM poking about in the process tree returns lots of cryptic commands. The number 3306 doesn't feature anywhere except /etc/my.cnf and bacula-dir.conf even though I'm running mysql, KMail and Bacula at the time. Graham ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-27 21:07, Dmitri Maziuk wrote: On 12/27/2021 2:02 PM, Josip Deanovic wrote: On 2021-12-27 19:19, Phil Stracchino wrote: ... The blazes? If mysql.user is a VIEW, something is VERY BADLY WRONG. Are you still using Akonadi's MySQL instance? Yes, that doesn't look normal. I hope it's not something Suse specific. Google sez it's one of the many improvements in mariadb 10.4. Does bacula support mariadb at all? Hmm... That's something I wasn't aware of. It seems that I get to learn something today as well. I don't think that such change would affect bacula support for mariadb but there might be some other changes as well. -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 12/27/21 15:07, Dmitri Maziuk wrote: On 12/27/2021 2:02 PM, Josip Deanovic wrote: On 2021-12-27 19:19, Phil Stracchino wrote: ... The blazes? If mysql.user is a VIEW, something is VERY BADLY WRONG. Are you still using Akonadi's MySQL instance? Yes, that doesn't look normal. I hope it's not something Suse specific. Google sez it's one of the many improvements in mariadb 10.4. Does bacula support mariadb at all? Not *officially*. But I'm using it with MariaDB Galera Cluster (10.5.10-r2) and I know it to work. And to my complete surprise, yes, mysql.user is now a VIEW in MariaDB. I have not yet formed an opinion as to whether I think this is a good idea. I consider quite a few of the ways in which mariaDB is diverging from MySQL to be at best questionable. Starting with the Aria storage engine that is supposed to somehow be all things to all people. -- Phil Stracchino Babylon Communications ph...@caerllewys.net p...@co.ordinate.org Landline: +1.603.293.8485 Mobile: +1.603.998.6958 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-27 21:01, Dmitri Maziuk wrote: Thank you, I learned something today (not that I wanted to: I try to stay away from that POS as much as I can, but that doesn't work 100%). Now I know why you had to grant to both 'root'@'localhost' and 'root'@'127.0.0.1' -- in addition to 'root'@'%' of course. Special care should be used when allowing access from other hosts. For example that 'root'@'%' would allow root access from any IP. Most people continue to keep mysql root user without password which might prove as a bad practice, especially in constellation with incorrectly set access permissions (grants). Also, all traffic is plain-text and very few people decide to configure TLS encryption although MySQL supports is for decades. -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 12/27/2021 2:02 PM, Josip Deanovic wrote: On 2021-12-27 19:19, Phil Stracchino wrote: ... The blazes? If mysql.user is a VIEW, something is VERY BADLY WRONG. Are you still using Akonadi's MySQL instance? Yes, that doesn't look normal. I hope it's not something Suse specific. Google sez it's one of the many improvements in mariadb 10.4. Does bacula support mariadb at all? Dima ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-27 19:19, Phil Stracchino wrote: On 12/27/21 12:10, Josip Deanovic wrote: On 2021-12-27 14:24, Graham Dicker wrote: I can't get those commands to work MariaDB [mysql]> CREATE USER 'bacula'@'localhost' IDENTIFIED BY 'xxx'; ERROR 1396 (HY000): Operation CREATE USER failed for 'bacula'@'localhost' MariaDB [mysql]> UPDATE mysql.user SET Host='localhost' WHERE User='bacula'; ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or column(s) The blazes? If mysql.user is a VIEW, something is VERY BADLY WRONG. Are you still using Akonadi's MySQL instance? Yes, that doesn't look normal. I hope it's not something Suse specific. -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 12/27/2021 1:44 PM, Josip Deanovic wrote: 'localhost' and '%' are special keywords. 'localhost' applies only to unix socket. '%' has a meaning of any AF_INTET socket (any IP address or host) So, the '%' does not include 'localhost'. Thank you, I learned something today (not that I wanted to: I try to stay away from that POS as much as I can, but that doesn't work 100%). Now I know why you had to grant to both 'root'@'localhost' and 'root'@'127.0.0.1' -- in addition to 'root'@'%' of course. Dima ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-27 19:56, Phil Stracchino wrote: On 12/27/21 13:38, Graham Dicker wrote: On Monday, 27 December 2021 18:19:23 GMT Phil Stracchino wrote: > The blazes? If mysql.user is a VIEW, something is VERY BADLY WRONG. > Are you still using Akonadi's MySQL instance? Not as far as I can tell. I changed /etc/my.cnf to say: port = 3306 And you are certain that the mysqld listening on that port is NOT Akonadi's? If Akonadi's mysqld is listening on port 3306, and you install a second mysqld, it will be unable to bind port 3306. You cannot have two different processes listening on the same port. Try this command as root: lsof -i | grep 3306 and see which mysql process is listening on that port. Then look at the process tree (ps axf) and see what that process belongs to. Remember that if you install a second mysqld, it will need to have its own separate mysql configuration file(s), and listen on its own separate socket and its own separate port, and you will have to configure bacula to use that socket and/or port. Personally I'm not a fan of PostgreSQL. Speaking as a computer scientist there are things about its internals that make me want to tear my hair out. But in this case you may actually have an easier time dumping your catalog schema from MySQL and importing it into PostgreSQL than in keeping two distinct MySQL instances properly separate when (and I do not intend any offense by this) it is clear that you don't really understand how to manage MySQL. The other option might be to set up a Bacula catalog DB on a different host that is not running Akonadi, migrate your catalog DB to that instance, and then configure the Director to talk to that host. I don't know how things look on Suse these days but on Centos 7.x There is only one MySQL installation on the system (meaning that akonadi doesn't bring its own mysql binaries and that is a good thing). Akonadi is using mormal mysql binaries to start its dedicated mysql instance using its own config file, datadir and unix socket. So it is unlikely that mysql used by akonadi is listening on the port 3306/TCP. -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-27 19:38, Graham Dicker wrote: On Monday, 27 December 2021 18:19:23 GMT Phil Stracchino wrote: On 12/27/21 12:10, Josip Deanovic wrote: > On 2021-12-27 14:24, Graham Dicker wrote: >> I can't get those commands to work >> >> MariaDB [mysql]> CREATE USER 'bacula'@'localhost' IDENTIFIED BY 'xxx'; >> ERROR 1396 (HY000): Operation CREATE USER failed for >> 'bacula'@'localhost' >> MariaDB [mysql]> UPDATE mysql.user SET Host='localhost' WHERE >> User='bacula'; >> ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or >> column(s) The blazes? If mysql.user is a VIEW, something is VERY BADLY WRONG. Are you still using Akonadi's MySQL instance? Not as far as I can tell. I changed /etc/my.cnf to say: port = 3306 I realized (eventually) that I couldn't create another user bacula without dropping the existing one first. So I dropped user bacula but now I can't create it again. create user 'bacula2'@'localhost'; works but create user 'bacula'@'localhost'; results in ERROR 1396 (HY000): Operation CREATE USER failed for 'bacula'@'localhost' Did you use drop user or did you manually remove user from the user table in the mysql database? If you manually deleted user from the mysql database, you need to issue the command: flush privileges; -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-27 19:28, Dmitri Maziuk wrote: On 12/27/2021 7:24 AM, Graham Dicker wrote: ... If I change the Catalog definition from dbname = "bacula"; dbuser = "bacula"; dbpassword = "" to dbname = "bacula"; dbuser = "root"; dbpassword = "" then Bacula does work but it doesn't "see" the volumes already in the database and wants to create new ones when I try to run a backup. 'bacula'@'%' is supposed to match bacula@ANY_HOST ('%' being the SQL wildcard) but in my limited mysql experience it never worked 100% of the time. 'localhost' and '%' are special keywords. 'localhost' applies only to unix socket. '%' has a meaning of any AF_INTET socket (any IP address or host) So, the '%' does not include 'localhost'. -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 12/27/21 13:38, Graham Dicker wrote: On Monday, 27 December 2021 18:19:23 GMT Phil Stracchino wrote: > The blazes? If mysql.user is a VIEW, something is VERY BADLY WRONG. > Are you still using Akonadi's MySQL instance? Not as far as I can tell. I changed /etc/my.cnf to say: port = 3306 And you are certain that the mysqld listening on that port is NOT Akonadi's? If Akonadi's mysqld is listening on port 3306, and you install a second mysqld, it will be unable to bind port 3306. You cannot have two different processes listening on the same port. Try this command as root: lsof -i | grep 3306 and see which mysql process is listening on that port. Then look at the process tree (ps axf) and see what that process belongs to. Remember that if you install a second mysqld, it will need to have its own separate mysql configuration file(s), and listen on its own separate socket and its own separate port, and you will have to configure bacula to use that socket and/or port. Personally I'm not a fan of PostgreSQL. Speaking as a computer scientist there are things about its internals that make me want to tear my hair out. But in this case you may actually have an easier time dumping your catalog schema from MySQL and importing it into PostgreSQL than in keeping two distinct MySQL instances properly separate when (and I do not intend any offense by this) it is clear that you don't really understand how to manage MySQL. The other option might be to set up a Bacula catalog DB on a different host that is not running Akonadi, migrate your catalog DB to that instance, and then configure the Director to talk to that host. -- Phil Stracchino Babylon Communications ph...@caerllewys.net p...@co.ordinate.org Landline: +1.603.293.8485 Mobile: +1.603.998.6958 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On Monday, 27 December 2021 18:19:23 GMT Phil Stracchino wrote: > On 12/27/21 12:10, Josip Deanovic wrote: > > On 2021-12-27 14:24, Graham Dicker wrote: > >> I can't get those commands to work > >> > >> MariaDB [mysql]> CREATE USER 'bacula'@'localhost' IDENTIFIED BY 'xxx'; > >> ERROR 1396 (HY000): Operation CREATE USER failed for > >> 'bacula'@'localhost' > >> MariaDB [mysql]> UPDATE mysql.user SET Host='localhost' WHERE > >> User='bacula'; > >> ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or > >> column(s) > > The blazes? If mysql.user is a VIEW, something is VERY BADLY WRONG. > > Are you still using Akonadi's MySQL instance? Not as far as I can tell. I changed /etc/my.cnf to say: port = 3306 I realized (eventually) that I couldn't create another user bacula without dropping the existing one first. So I dropped user bacula but now I can't create it again. create user 'bacula2'@'localhost'; works but create user 'bacula'@'localhost'; results in ERROR 1396 (HY000): Operation CREATE USER failed for 'bacula'@'localhost' Graham ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 12/27/2021 7:24 AM, Graham Dicker wrote: ... If I change the Catalog definition from dbname = "bacula"; dbuser = "bacula"; dbpassword = "" to dbname = "bacula"; dbuser = "root"; dbpassword = "" then Bacula does work but it doesn't "see" the volumes already in the database and wants to create new ones when I try to run a backup. 'bacula'@'%' is supposed to match bacula@ANY_HOST ('%' being the SQL wildcard) but in my limited mysql experience it never worked 100% of the time. You need to figure out who really owns bacula database and every object in it, and connect as that role. There is an easier way out: switch to postgres and thank me later. Dima ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 12/27/21 12:10, Josip Deanovic wrote: On 2021-12-27 14:24, Graham Dicker wrote: I can't get those commands to work MariaDB [mysql]> CREATE USER 'bacula'@'localhost' IDENTIFIED BY 'xxx'; ERROR 1396 (HY000): Operation CREATE USER failed for 'bacula'@'localhost' MariaDB [mysql]> UPDATE mysql.user SET Host='localhost' WHERE User='bacula'; ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or column(s) The blazes? If mysql.user is a VIEW, something is VERY BADLY WRONG. Are you still using Akonadi's MySQL instance? -- Phil Stracchino Babylon Communications ph...@caerllewys.net p...@co.ordinate.org Landline: +1.603.293.8485 Mobile: +1.603.998.6958 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-27 14:24, Graham Dicker wrote: I can't get those commands to work MariaDB [mysql]> CREATE USER 'bacula'@'localhost' IDENTIFIED BY 'xxx'; ERROR 1396 (HY000): Operation CREATE USER failed for 'bacula'@'localhost' MariaDB [mysql]> UPDATE mysql.user SET Host='localhost' WHERE User='bacula'; ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them If I change the Catalog definition from dbname = "bacula"; dbuser = "bacula"; dbpassword = "" to dbname = "bacula"; dbuser = "root"; dbpassword = "" then Bacula does work but it doesn't "see" the volumes already in the database and wants to create new ones when I try to run a backup. Ok, so I started mysql and went through the whole procedure on an empty mysql instance. Here it is... [root@test ~]# grep -v "^#" /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock symbolic-links=0 [mysqld_safe] log-error=/var/log/mariadb/mariadb.log pid-file=/var/run/mariadb/mariadb.pid [root@test ~]# mysql -h localhost -u root Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 3 Server version: 5.5.68-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> create user 'bacula'@'localhost' identified by 'your password'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> create database bacula; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> show databases; ++ | Database | ++ | information_schema | | bacula | | mysql | | performance_schema | | test | ++ 5 rows in set (0.00 sec) MariaDB [(none)]> use mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [mysql]> select host,user from user where user='bacula'; +---++ | host | user | +---++ | localhost | bacula | +---++ 1 row in set (0.01 sec) MariaDB [mysql]> grant all privileges on bacula.* to 'bacula'@'localhost'; Query OK, 0 rows affected (0.00 sec) MariaDB [mysql]> exit Bye [root@test ~]# mysql -h localhost -u bacula -p bacula Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 4 Server version: 5.5.68-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [bacula]> show tables; Empty set (0.00 sec) MariaDB [bacula]> exit Bye ## I am doing the next step in order to switch bacula support from ## postgres to mysql (on my installation default was postgres). [root@test ~]# alternatives --config libbaccats.so There are 3 programs which provide 'libbaccats.so'. SelectionCommand --- 1 /usr/lib64/libbaccats-mysql.so 2 /usr/lib64/libbaccats-sqlite3.so *+ 3 /usr/lib64/libbaccats-postgresql.so Enter to keep the current selection[+], or type selection number: 1 [root@test ~]# /usr/libexec/bacula/make_mysql_tables Creation of Bacula MySQL tables succeeded. [root@test ~]# mysql -h localhost -u bacula -p bacula Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 7 Server version: 5.5.68-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [bacula]> show tables; +--+ | Tables_in_bacula | +--+ | BaseFiles| | CDImages | | Client | | Counters | | Device | | File | | FileSet | | Filename | | Job | | JobHisto | | JobMedia | | Location | | LocationLog | | Log | | Media| | MediaType| | Path | | PathHierarchy| | PathVisibility | | Pool | | RestoreObject| | Snapshot | | Status | | Storage | | UnsavedFiles | | Version | +--+ 26 rows in set (0.00 sec) MariaDB [bacula]> exit Bye [root@test ~]# /usr/libexec/bacula/grant_mysql_privileges Created MySQL database user: bacula ## I have removed part of the output because it would only mess up ## the message without adding any value to the discussion. Privileges for user bacula granted on database bacula. ## This is an example of data import from the bacula_db.sql file [roo
Re: [Bacula-users] make_catalog_backup stopped working
On Monday, 27 December 2021 12:34:32 GMT Josip Deanovic wrote: > On 2021-12-27 12:55, Graham Dicker wrote: > > I tried (while running mysql as root) > > MariaDB [(none)]> UPDATE mysql.db SET Host='localhost' WHERE > > User='bacula'; > > > > that worked OK > > > > but this didn't > > > > MariaDB [(none)]> UPDATE mysql.user SET Host='localhost' WHERE > > User='bacula'; > > ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or > > column(s) or > > function(s) or definer/invoker of view lack rights to use them > > > > I'm sure Bacula never used to involve this much mucking about! The > > configure and build > > process used to take care of all this didn't it? > > But this is not about bacula, this is about basic mysql administration. > Bacula is completely innocent here. :-) > > So, what you need to do is to start mysql service as usual and > connect to that mysql instance as user root. > > If you cannot connet to that mysql instance like this: > mysql -u root > ... then this is another problem (assuming you didn't setup > root password already). > > > After you connect to the correct mysql instance as root, you > will be able to "enter" the database you need which is in this > case "mysql" database so you would need to issue this command: > "use mysql;" > > After that you would need to perform update you already tried: > "update user set Host='localhost' where User='bacula';" > And after that you would need to issue the command "flush privileges;" > which is in this case necessary because you are modifying > data on the mysql system tables. > > Instead of all of the above, you could just add bacula user in > mysql client like this: > CREATE USER 'bacula'@'localhost' IDENTIFIED BY 'your password'; > > Then you could create bacula database using the command in > mysql client: > "create database if not exists bacula;" > > After that you would need to use the GRANT command mentioned in > previous posts. The purpose of GRANT command is to give privileges > over the "bacula" mysql database to the "bacula" mysql user. > > When this is done, you should be able to connect as user > "bacula" to the database "bacula" using mysql client like this: > mysql -h localhost -u bacula -p bacula > > After that, you should be able to import your bacula data into > the bacula database using mysql client like this: > mysql -h localhost -u bacula -p bacula < bacula_db_backup.sql > > The only thing left to would be to update your bacula-dir.conf > accordingly and that's it. > > > Note that for mysql client there is a difference between localhost > and 127.0.0.1. > Localhost means that the client will be using unix socket whereas > the 127.0.0.1 will instruct the mysql client to open TCP connection > to 127.0.0.1:3306 (by default). > > > Apologies for typos if there are any, I am writing in a hurry. > > > Regards! Sorry about copy and paste problems. Copy and paste from console window to KMail does not work. Here is what it should have said: I can't get those commands to work MariaDB [mysql]> CREATE USER 'bacula'@'localhost' IDENTIFIED BY 'xxx'; ERROR 1396 (HY000): Operation CREATE USER failed for 'bacula'@'localhost' MariaDB [mysql]> UPDATE mysql.user SET Host='localhost' WHERE User='bacula'; ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them If I change the Catalog definition from dbname = "bacula"; dbuser = "bacula"; dbpassword = "" to dbname = "bacula"; dbuser = "root"; dbpassword = "" then Bacula does work but it doesn't "see" the volumes already in the database and wants to create new ones when I try to run a backup. Graham ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
I can't get those commands to work *vivaldi:/home/graham #* mysql -u root *Welcome to the MariaDB monitor. Commands end with ; or \g.* *Your MariaDB connection id is 30* *Server version: 10.5.13-MariaDB MariaDB package* *Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.* *Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.* *Database changed* If I change the Catalog definition from dbname = "bacula"; dbuser = "bacula"; dbpassword = "" to dbname = "bacula"; dbuser = "root"; dbpassword = "" then Bacula does work but it doesn't "see" the volumes already in the database and wants to create new ones when I try to run a backup. Graham ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-27 12:55, Graham Dicker wrote: I tried (while running mysql as root) MariaDB [(none)]> UPDATE mysql.db SET Host='localhost' WHERE User='bacula'; that worked OK but this didn't MariaDB [(none)]> UPDATE mysql.user SET Host='localhost' WHERE User='bacula'; ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them I'm sure Bacula never used to involve this much mucking about! The configure and build process used to take care of all this didn't it? But this is not about bacula, this is about basic mysql administration. Bacula is completely innocent here. :-) So, what you need to do is to start mysql service as usual and connect to that mysql instance as user root. If you cannot connet to that mysql instance like this: mysql -u root ... then this is another problem (assuming you didn't setup root password already). After you connect to the correct mysql instance as root, you will be able to "enter" the database you need which is in this case "mysql" database so you would need to issue this command: "use mysql;" After that you would need to perform update you already tried: "update user set Host='localhost' where User='bacula';" And after that you would need to issue the command "flush privileges;" which is in this case necessary because you are modifying data on the mysql system tables. Instead of all of the above, you could just add bacula user in mysql client like this: CREATE USER 'bacula'@'localhost' IDENTIFIED BY 'your password'; Then you could create bacula database using the command in mysql client: "create database if not exists bacula;" After that you would need to use the GRANT command mentioned in previous posts. The purpose of GRANT command is to give privileges over the "bacula" mysql database to the "bacula" mysql user. When this is done, you should be able to connect as user "bacula" to the database "bacula" using mysql client like this: mysql -h localhost -u bacula -p bacula After that, you should be able to import your bacula data into the bacula database using mysql client like this: mysql -h localhost -u bacula -p bacula < bacula_db_backup.sql The only thing left to would be to update your bacula-dir.conf accordingly and that's it. Note that for mysql client there is a difference between localhost and 127.0.0.1. Localhost means that the client will be using unix socket whereas the 127.0.0.1 will instruct the mysql client to open TCP connection to 127.0.0.1:3306 (by default). Apologies for typos if there are any, I am writing in a hurry. Regards! -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On Monday, 27 December 2021 10:16:38 GMT Josip Deanovic wrote: > On 2021-12-27 10:34, Graham Dicker wrote: > [...] > > > Thank you for the information. > > mysql> select user, host from mysql.user; > > returned the following (without the leading dots) : > > . +-+---+ > > . | User| Host | > > . +-+---+ > > . | bacula | % | > > . | | localhost | > > . | mariadb.sys | localhost | > > . | mysql | localhost | > > . | root| localhost | > > . | | vivaldi | > > . +-+---+ > > > > I don't use passwords in my Bacula config files so I tried: > > MariaDB [(none)]> GRANT ALL PRIVILEGES ON bacula.* TO > > 'bacula'@'localhost'; > > but it returned: > > ERROR 1133 (28000): Can't find any matching row in the user table > > That's because you don't have the row that looks like: > . +-+---+ > . | User| Host | > . +-+---+ > . | bacula | localhost | > > You have only: > - +-+---+ > . | User| Host | > . +-+---+ > . | bacula | % | > > Which is nit the same thus the error "Can't find any matching > row in the user table". > > > Regards! I tried (while running mysql as root) MariaDB [(none)]> UPDATE mysql.db SET Host='localhost' WHERE User='bacula'; that worked OK but this didn't MariaDB [(none)]> UPDATE mysql.user SET Host='localhost' WHERE User='bacula'; ERROR 1356 (HY000): View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them I'm sure Bacula never used to involve this much mucking about! The configure and build process used to take care of all this didn't it? Graham ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-27 10:34, Graham Dicker wrote: [...] Thank you for the information. mysql> select user, host from mysql.user; returned the following (without the leading dots) : . +-+---+ . | User| Host | . +-+---+ . | bacula | % | . | | localhost | . | mariadb.sys | localhost | . | mysql | localhost | . | root| localhost | . | | vivaldi | . +-+---+ I don't use passwords in my Bacula config files so I tried: MariaDB [(none)]> GRANT ALL PRIVILEGES ON bacula.* TO 'bacula'@'localhost'; but it returned: ERROR 1133 (28000): Can't find any matching row in the user table That's because you don't have the row that looks like: . +-+---+ . | User| Host | . +-+---+ . | bacula | localhost | You have only: - +-+---+ . | User| Host | . +-+---+ . | bacula | % | Which is nit the same thus the error "Can't find any matching row in the user table". Regards! -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On Sunday, 26 December 2021 17:19:15 GMT Phil Stracchino wrote: > You say you can log into the mysql instance as root. Do this: > > mysql> select user, host from mysql.user; > > See if there is a bacula user or another such user that you created for > your catalog database. You should see something like: > > +-+-+ > | User| Host| > +-+-+ > | alaric | 10.24.32.% | > | bacula | 10.24.32.% | > | books | 10.24.32.% | > > If so: > > mysql> GRANT ALL PRIVILEGES ON bacula.* TO 'bacula'@'localhost' (or > whatever DB user you want bacula to connect as) IDENTIFIED BY 'bacula > password goes here'; Thank you for the information. mysql> select user, host from mysql.user; returned the following (without the leading dots) : . +-+---+ . | User| Host | . +-+---+ . | bacula | % | . | | localhost | . | mariadb.sys | localhost | . | mysql | localhost | . | root| localhost | . | | vivaldi | . +-+---+ I don't use passwords in my Bacula config files so I tried: MariaDB [(none)]> GRANT ALL PRIVILEGES ON bacula.* TO 'bacula'@'localhost'; but it returned: ERROR 1133 (28000): Can't find any matching row in the user table Cheers Graham ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 12/26/21 12:59, Josip Deanovic wrote: When using MySQL roles and grant statement to change privileges, the command "flush privileges" is not necessary but it doesn't hurt. When modifying mysql/user and similar tables then it is necessary to issue "flush privileges" in order to re-read and apply changes made to the tables. Never hurts to be sure. You will never cause a problem by calling FLUSH PRIVILEGES when you didn't need to. Unfortunately, many years ago KDE PIM application suite moved to akonadi which uses and manages its own mysql instance. That made it awfully slow and unstable, hard to debug and understand and even harder to trace the problem and fix but the wheel of "progress" doesn't care much about functionality. I totally hear you. Prime case in point: systemd. Also, you mentioned "embedded instance" but I am not sure if this can be called embedded instance because the there is an actual mysql daemon running. It just uses dedicated config file and datadir. Embedded as in "the application sets up its own dedicated mysql instance that it assumes nothing else will use". -- Phil Stracchino Babylon Communications ph...@caerllewys.net p...@co.ordinate.org Landline: +1.603.293.8485 Mobile: +1.603.998.6958 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-26 18:19, Phil Stracchino wrote: If so: mysql> GRANT ALL PRIVILEGES ON bacula.* TO 'bacula'@'localhost' (or whatever DB user you want bacula to connect as) IDENTIFIED BY 'bacula password goes here'; mysql> FLUSH PRIVILEGES; When using MySQL roles and grant statement to change privileges, the command "flush privileges" is not necessary but it doesn't hurt. When modifying mysql/user and similar tables then it is necessary to issue "flush privileges" in order to re-read and apply changes made to the tables. If there is not an existing user for bacula, run the same command, but make up a new username. (For sanity's sake I suggest using 'bacula', then you'll never be in any doubt what it is.) Then go back into your Bacula director config, set the mysql credentials to what you just set above, restart the Director, and try again. KMail/akonadi is a separate issue. I'm not a fan of services that set up their own embedded mysql instances. Multiple mysql (or most other database) instances running on the same host will ALWAYS, *ALWAYS*, perform worse, for all services, than a single properly tuned instance utilizing the same resources. Unfortunately, many years ago KDE PIM application suite moved to akonadi which uses and manages its own mysql instance. That made it awfully slow and unstable, hard to debug and understand and even harder to trace the problem and fix but the wheel of "progress" doesn't care much about functionality. Also, you mentioned "embedded instance" but I am not sure if this can be called embedded instance because the there is an actual mysql daemon running. It just uses dedicated config file and datadir. MySQL used to support embedded instance which meant that you could access your data without daemon running. This was a long time ago and I don't know if such support still exists in MySQL. I remember that the data file needed to be preallocated to about 32MB which was too much for my purposes. That's when I learned about SQLite and moved in different direction. Regards! -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 2021-12-26 13:47, Graham Dicker wrote: Thank you Josip this is very helpful. I have restored everything I had tinkered with back to what it was, that is: Removed specification of port and socket from /etc/my.cnf Removed specification of port and socket from bacula-dir.conf both of this were previously specifying the akonadi socket and port 3306 now './bacula' start from a console as root puts this message in the log: 26-Dec 09:40 bacula-dir JobId 0: Fatal error: Could not open Catalog "MyCatalog", database "bacula". If I run mysql from a console as root then 'use bacula' succeeds and I can access the tables but if i try the same thing as a normal user I get: MariaDB [(none)]> use bacula; KMail/akonadi behaviour is still not normal. I have to click the Kmail icon, then the desktop, then KMail icon again to get it to start, and at least the first time of collecting my POP3 email takes a lot longer than usual. Graham I see that my attempts to paste messages copied from a console window into an email are not working as I expect. Trying again...The message above should have read: 26-Dec 09:39 bacula-dir JobId 0: Fatal error: Could not open Catalog "MyCatalog", database "bacula". 26-Dec 09:39 bacula-dir JobId 0: Fatal error: mysql.c:293 Unable to connect to MySQL server. Database=bacula User=bacula MySQL connect failed either server not running or your authorization is incorrect. 26-Dec 09:39 bacula-dir ERROR TERMINATION Please correct configuration file: /opt/bacula/etc/bacula-dir.conf Ok. So, leave akonadi to use its own mysql instance and don't use it for anything else. This is the default setup on the Centos/RHEL and I assume that Suse is doing the same in that regards. So, you need to configure your separate (I would say normal) mysql service which you can use for all your purposes (including bacula). That would mean that you would need to configure your /etc/my.cnf to point to the correct mysql data directory (e.g. datadir=/var/lib/mysql), you would need to define either some socket (e.g. socket=/var/lib/mysql/mysql.sock) or IP and port. Then you would need to enable and start that service using the the usual procedure that applies for you OS (probably using systemctl tool as this is the most common thing these days, on Linux distributions). Then you would need to create the database you plan to use for bacula and its database user. After that you will need to populate it with the bacula tables. Be careful to use the correct credentials when connecting to the database (make sure you are using the correct mysql service and not the one dedicated to akonadi). After that, you will need to reconfigure your bacula-dir.conf the way it uses correct connection info and user credentials. Regards! -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 12/26/21 07:47, Graham Dicker wrote: I see that my attempts to paste messages copied from a console window into an email are not working as I expect. Trying again...The message above should have read: 26-Dec 09:39 bacula-dir JobId 0: Fatal error: Could not open Catalog "MyCatalog", database "bacula". 26-Dec 09:39 bacula-dir JobId 0: Fatal error: mysql.c:293 Unable to connect to MySQL server. Database=bacula User=bacula MySQL connect failed either server not running or your authorization is incorrect. 26-Dec 09:39 bacula-dir ERROR TERMINATION Please correct configuration file: /opt/bacula/etc/bacula-dir.conf From all of the above it appears that your MySQL credentials are incorrectly configured. You say you can log into the mysql instance as root. Do this: mysql> select user, host from mysql.user; See if there is a bacula user or another such user that you created for your catalog database. You should see something like: +-+-+ | User| Host| +-+-+ | alaric | 10.24.32.% | | bacula | 10.24.32.% | | books | 10.24.32.% | ... If so: mysql> GRANT ALL PRIVILEGES ON bacula.* TO 'bacula'@'localhost' (or whatever DB user you want bacula to connect as) IDENTIFIED BY 'bacula password goes here'; mysql> FLUSH PRIVILEGES; If there is not an existing user for bacula, run the same command, but make up a new username. (For sanity's sake I suggest using 'bacula', then you'll never be in any doubt what it is.) Then go back into your Bacula director config, set the mysql credentials to what you just set above, restart the Director, and try again. KMail/akonadi is a separate issue. I'm not a fan of services that set up their own embedded mysql instances. Multiple mysql (or most other database) instances running on the same host will ALWAYS, *ALWAYS*, perform worse, for all services, than a single properly tuned instance utilizing the same resources. -- Phil Stracchino Babylon Communications ph...@caerllewys.net p...@co.ordinate.org Landline: +1.603.293.8485 Mobile: +1.603.998.6958 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On Sunday, 26 December 2021 10:42:58 GMT Graham Dicker wrote: > On Saturday, 25 December 2021 17:18:56 GMT Josip Deanovic wrote: > > On Friday 2021-12-24 13:32:42 Graham Dicker wrote: > > > Thanks for the tip Phil, which I will bear in mind if I ever get Bacula > > > working again as it should (and has done for the past 10 years or more). > > > Up until about a year ago my workstation would boot itself up when > > > woken by the motherboard timer and Bacula would start running as a > > > service and do the necessary backups. The first thing that stopped > > > working was the service. There seemed to be some problem with timing > > > between Bacula and mysql. I got around it by dropping the service and > > > using crontab to start mysql and Bacula in that order. Then a few > > > months ago that started failing due to some disagreement between > > > akonadi, Bacula and mysql as to where the mysql socket was and which > > > port was to be used. I solved that by total surrender to akonadi and > > > told Bacula to use the socket created by akonadi. Now I don't know > > > what's gone wrong. KMail behaviour has also changed in the last few day > > > also; I have to click on it twice to make it start up. I think OpenSuse > > > 15.3 must have had some dodgy updates recently. > > > > That would explain why your database disappeared. It seems that you > > have been using mysql instance dedicated to akonadi service. > > > > I don't know how things are setup on Suse but on Centos/RHEL, akonadi > > service would by default bring up its own mysql instance, with its own > > mysql config file and data directory. It would also use its own socket. > > > > I wouldn't use that mysql instance for anything else but akonadi. > > > > I strongly suggest that you configure and bring up normal mysql service > > which can safely be used for bacula and other services as you se fit. > > If configured correctly you will not lose your databases any more. > > > > The timing between mysql and Bacula you have mentioned is likely caused > > by the akonadi which starts its mysql instance and that happens only > > during the graphical login or even after you start the "kontact" or > > similar application such as "kmail". > > > > > > Regards! > > Thank you Josip this is very helpful. I have restored everything I had > tinkered with back to what it was, that is: > > Removed specification of port and socket from /etc/my.cnf > Removed specification of port and socket from bacula-dir.conf > > both of this were previously specifying the akonadi socket and port 3306 > > now './bacula' start from a console as root puts this message in the log: > > 26-Dec 09:40 bacula-dir JobId 0: Fatal error: Could not open Catalog > "MyCatalog", database "bacula". > > If I run mysql from a console as root then 'use bacula' succeeds and I can > access the tables but if i try the same thing as a normal user I get: > > MariaDB [(none)]> use bacula; > > KMail/akonadi behaviour is still not normal. I have to click the Kmail icon, > then the desktop, then KMail icon again to get it to start, and at least > the first time of collecting my POP3 email takes a lot longer than usual. > > Graham I see that my attempts to paste messages copied from a console window into an email are not working as I expect. Trying again...The message above should have read: 26-Dec 09:39 bacula-dir JobId 0: Fatal error: Could not open Catalog "MyCatalog", database "bacula". 26-Dec 09:39 bacula-dir JobId 0: Fatal error: mysql.c:293 Unable to connect to MySQL server. Database=bacula User=bacula MySQL connect failed either server not running or your authorization is incorrect. 26-Dec 09:39 bacula-dir ERROR TERMINATION Please correct configuration file: /opt/bacula/etc/bacula-dir.conf ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On Sunday, 26 December 2021 10:42:58 GMT Graham Dicker wrote: > On Saturday, 25 December 2021 17:18:56 GMT Josip Deanovic wrote: > > On Friday 2021-12-24 13:32:42 Graham Dicker wrote: > > > Thanks for the tip Phil, which I will bear in mind if I ever get Bacula > > > working again as it should (and has done for the past 10 years or more). > > > Up until about a year ago my workstation would boot itself up when > > > woken by the motherboard timer and Bacula would start running as a > > > service and do the necessary backups. The first thing that stopped > > > working was the service. There seemed to be some problem with timing > > > between Bacula and mysql. I got around it by dropping the service and > > > using crontab to start mysql and Bacula in that order. Then a few > > > months ago that started failing due to some disagreement between > > > akonadi, Bacula and mysql as to where the mysql socket was and which > > > port was to be used. I solved that by total surrender to akonadi and > > > told Bacula to use the socket created by akonadi. Now I don't know > > > what's gone wrong. KMail behaviour has also changed in the last few day > > > also; I have to click on it twice to make it start up. I think OpenSuse > > > 15.3 must have had some dodgy updates recently. > > > > That would explain why your database disappeared. It seems that you > > have been using mysql instance dedicated to akonadi service. > > > > I don't know how things are setup on Suse but on Centos/RHEL, akonadi > > service would by default bring up its own mysql instance, with its own > > mysql config file and data directory. It would also use its own socket. > > > > I wouldn't use that mysql instance for anything else but akonadi. > > > > I strongly suggest that you configure and bring up normal mysql service > > which can safely be used for bacula and other services as you se fit. > > If configured correctly you will not lose your databases any more. > > > > The timing between mysql and Bacula you have mentioned is likely caused > > by the akonadi which starts its mysql instance and that happens only > > during the graphical login or even after you start the "kontact" or > > similar application such as "kmail". > > > > > > Regards! > > Thank you Josip this is very helpful. I have restored everything I had > tinkered with back to what it was, that is: > > Removed specification of port and socket from /etc/my.cnf > Removed specification of port and socket from bacula-dir.conf > > both of this were previously specifying the akonadi socket and port 3306 > > now './bacula' start from a console as root puts this message in the log: > > 26-Dec 09:40 bacula-dir JobId 0: Fatal error: Could not open Catalog > "MyCatalog", database "bacula". > > If I run mysql from a console as root then 'use bacula' succeeds and I can > access the tables but if i try the same thing as a normal user I get: > > MariaDB [(none)]> use bacula; > > KMail/akonadi behaviour is still not normal. I have to click the Kmail icon, > then the desktop, then KMail icon again to get it to start, and at least > the first time of collecting my POP3 email takes a lot longer than usual. > > Graham That should have read: If I run mysql from a console as root then 'use bacula' succeeds and I can access the tables but if i try the same thing as a normal user I get: MariaDB [(none)]> use bacula; ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'bacula' ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On Saturday, 25 December 2021 17:18:56 GMT Josip Deanovic wrote: > On Friday 2021-12-24 13:32:42 Graham Dicker wrote: > > Thanks for the tip Phil, which I will bear in mind if I ever get Bacula > > working again as it should (and has done for the past 10 years or more). > > Up until about a year ago my workstation would boot itself up when > > woken by the motherboard timer and Bacula would start running as a > > service and do the necessary backups. The first thing that stopped > > working was the service. There seemed to be some problem with timing > > between Bacula and mysql. I got around it by dropping the service and > > using crontab to start mysql and Bacula in that order. Then a few > > months ago that started failing due to some disagreement between > > akonadi, Bacula and mysql as to where the mysql socket was and which > > port was to be used. I solved that by total surrender to akonadi and > > told Bacula to use the socket created by akonadi. Now I don't know > > what's gone wrong. KMail behaviour has also changed in the last few day > > also; I have to click on it twice to make it start up. I think OpenSuse > > 15.3 must have had some dodgy updates recently. > > That would explain why your database disappeared. It seems that you > have been using mysql instance dedicated to akonadi service. > > I don't know how things are setup on Suse but on Centos/RHEL, akonadi > service would by default bring up its own mysql instance, with its own > mysql config file and data directory. It would also use its own socket. > > I wouldn't use that mysql instance for anything else but akonadi. > > I strongly suggest that you configure and bring up normal mysql service > which can safely be used for bacula and other services as you se fit. > If configured correctly you will not lose your databases any more. > > The timing between mysql and Bacula you have mentioned is likely caused > by the akonadi which starts its mysql instance and that happens only > during the graphical login or even after you start the "kontact" or > similar application such as "kmail". > > > Regards! Thank you Josip this is very helpful. I have restored everything I had tinkered with back to what it was, that is: Removed specification of port and socket from /etc/my.cnf Removed specification of port and socket from bacula-dir.conf both of this were previously specifying the akonadi socket and port 3306 now './bacula' start from a console as root puts this message in the log: 26-Dec 09:40 bacula-dir JobId 0: Fatal error: Could not open Catalog "MyCatalog", database "bacula". If I run mysql from a console as root then 'use bacula' succeeds and I can access the tables but if i try the same thing as a normal user I get: MariaDB [(none)]> use bacula; KMail/akonadi behaviour is still not normal. I have to click the Kmail icon, then the desktop, then KMail icon again to get it to start, and at least the first time of collecting my POP3 email takes a lot longer than usual. Graham ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On Friday 2021-12-24 13:32:42 Graham Dicker wrote: > Thanks for the tip Phil, which I will bear in mind if I ever get Bacula > working again as it should (and has done for the past 10 years or more). > Up until about a year ago my workstation would boot itself up when > woken by the motherboard timer and Bacula would start running as a > service and do the necessary backups. The first thing that stopped > working was the service. There seemed to be some problem with timing > between Bacula and mysql. I got around it by dropping the service and > using crontab to start mysql and Bacula in that order. Then a few > months ago that started failing due to some disagreement between > akonadi, Bacula and mysql as to where the mysql socket was and which > port was to be used. I solved that by total surrender to akonadi and > told Bacula to use the socket created by akonadi. Now I don't know > what's gone wrong. KMail behaviour has also changed in the last few day > also; I have to click on it twice to make it start up. I think OpenSuse > 15.3 must have had some dodgy updates recently. That would explain why your database disappeared. It seems that you have been using mysql instance dedicated to akonadi service. I don't know how things are setup on Suse but on Centos/RHEL, akonadi service would by default bring up its own mysql instance, with its own mysql config file and data directory. It would also use its own socket. I wouldn't use that mysql instance for anything else but akonadi. I strongly suggest that you configure and bring up normal mysql service which can safely be used for bacula and other services as you se fit. If configured correctly you will not lose your databases any more. The timing between mysql and Bacula you have mentioned is likely caused by the akonadi which starts its mysql instance and that happens only during the graphical login or even after you start the "kontact" or similar application such as "kmail". Regards! -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On Thursday 2021-12-23 14:42:12 Graham Dicker wrote: > Hi all > > I'm running Bacula on a desk machine with OpenSuse 15.3 and Bacula > 11.0.4. > > The make_catalog_backup command has stopped working following a complete > loss and restore of my Bacula database. > I don't know how the database vanished but I restored it from the last > successful backup thus: > > ./bextract -b ../working/BackupCatalog.bsr /media/seagate4tb /tmp > mysql > create database bacula; > use bacula; > source bacula.sql; > grant_mysql_privileges > > But now although my main backup works fine the backup of the catalog > gets this error: > > 23-Dec 13:39 vivaldi-dir JobId 65: BeforeJob: mysqldump: Got error: > 1044: "Access denied for user ''@'localhost' to database 'bacula'" when > selecting the database > > Any clues? Thanks in advance. Hello Graham! The problem here is the access to the MySQL database. Maybe the script that does the catalog backup doesn't use the correct database user. Maybe you are using non-default location of the bacula director configuration file? The error says: "Access denied for user ''@'localhost'". As you can see the username part is empty. Regards! -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On Thursday 2021-12-23 13:04:13 Phil Stracchino wrote: > On 12/23/21 11:19, Graham Dicker wrote: > > Thank you for your reply Graham. > > > > I don't think Bacula itself has any problems, it is only the script > > mysqldump that has a problem. The script is just supposed to create a > > dump of the database and (if it is successful) then Bacula goes on to > > first back it up and then delete it. > > I'm gonna be very blunt here. mysqldump is a piece of obsolete garbage > and nobody should be using it any more. It CANNOT, period, CORRECTLY > back up both My ISAM and InnoDB tables in the same dump. CANNOT. > (Nobody should be using the MyISAM storage engine any more either, but > that's another issue.) > > Take a look at mydumper instead. It is better than mysqldump in almost > every imaginable way. It is parallelized, storage engine aware, and > immensely easier to do partial restores with (i.e a single schema or a > handful of tables). It is what mysqldump SHOULD have evolved into > fifteen years ago. I would suggest XtraBackup in case of MySQL Percona and Mariabackup in case of MariaDB 10.1 and newer. The tool is supported by the Percona and MariaDB software distribution. It produces no downtime and supports incremental backups. Regards! -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On Thursday, 23 December 2021 18:04:13 GMT Phil Stracchino wrote: > On 12/23/21 11:19, Graham Dicker wrote: > > Thank you for your reply Graham. > > > > I don't think Bacula itself has any problems, it is only the script > > mysqldump that has a problem. The script is just supposed to create a > > dump of the database and (if it is successful) then Bacula goes on to > > first back it up and then delete it. > > I'm gonna be very blunt here. mysqldump is a piece of obsolete garbage > and nobody should be using it any more. It CANNOT, period, CORRECTLY > back up both My ISAM and InnoDB tables in the same dump. CANNOT. > (Nobody should be using the MyISAM storage engine any more either, but > that's another issue.) > > Take a look at mydumper instead. It is better than mysqldump in almost > every imaginable way. It is parallelized, storage engine aware, and > immensely easier to do partial restores with (i.e a single schema or a > handful of tables). It is what mysqldump SHOULD have evolved into > fifteen years ago. Thanks for the tip Phil, which I will bear in mind if I ever get Bacula working again as it should (and has done for the past 10 years or more). Up until about a year ago my workstation would boot itself up when woken by the motherboard timer and Bacula would start running as a service and do the necessary backups. The first thing that stopped working was the service. There seemed to be some problem with timing between Bacula and mysql. I got around it by dropping the service and using crontab to start mysql and Bacula in that order. Then a few months ago that started failing due to some disagreement between akonadi, Bacula and mysql as to where the mysql socket was and which port was to be used. I solved that by total surrender to akonadi and told Bacula to use the socket created by akonadi. Now I don't know what's gone wrong. KMail behaviour has also changed in the last few day also; I have to click on it twice to make it start up. I think OpenSuse 15.3 must have had some dodgy updates recently. ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
On 12/23/21 11:19, Graham Dicker wrote: Thank you for your reply Graham. I don't think Bacula itself has any problems, it is only the script mysqldump that has a problem. The script is just supposed to create a dump of the database and (if it is successful) then Bacula goes on to first back it up and then delete it. I'm gonna be very blunt here. mysqldump is a piece of obsolete garbage and nobody should be using it any more. It CANNOT, period, CORRECTLY back up both My ISAM and InnoDB tables in the same dump. CANNOT. (Nobody should be using the MyISAM storage engine any more either, but that's another issue.) Take a look at mydumper instead. It is better than mysqldump in almost every imaginable way. It is parallelized, storage engine aware, and immensely easier to do partial restores with (i.e a single schema or a handful of tables). It is what mysqldump SHOULD have evolved into fifteen years ago. -- Phil Stracchino Babylon Communications ph...@caerllewys.net p...@co.ordinate.org Landline: +1.603.293.8485 Mobile: +1.603.998.6958 ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
Hi. I see--it's worth checking then the command that is called by the catalogue backup job (the "BeforeJob" directive in the "Job" (or "JobDefs") resource). On my system the catalogue job calls, in its "BeforeJob" directive, the following: "/opt/bacula/etc/make_catalog_backup.pl MyCatalog". According to the output of Job 65 on your server, "BeforeJob" runs "mysqldump", which isn't what I'm expecting (but my config files are from an older version of Bacula--so I might be wrong here). I'd seek out the "BeforeJob =" line of bacula-dir.conf, and check the script it executes to make sure it has the credentials it needs. Thanks. -- Graham Sparks From: Graham Dicker Sent: 23 December 2021 16:19 To: bacula-users@lists.sourceforge.net Subject: Re: [Bacula-users] make_catalog_backup stopped working Thank you for your reply Graham. I don't think Bacula itself has any problems, it is only the script mysqldump that has a problem. The script is just supposed to create a dump of the database and (if it is successful) then Bacula goes on to first back it up and then delete it. On Thursday, 23 December 2021 15:14:08 GMT Graham Sparks wrote: > Hi. > > I'm surprised your other backups are working--if you have just one database > server, your Bacula director should be using the same credentials to > connect to the database, regardless of the job. > > In your "bacula-dir.conf" file, there will be the username and password that > Bacula uses to connect to the catalogue database: > > e.g. > > > > Catalog { > Name = MyCatalog > dbname = "your-bacula-database-name"; dbuser = "your-bacula-user"; > dbpassword = "your-password" } > > > > > Make sure your database name, user and password match the current catalogue > database settings configured in your bacula-dir.conf. On your MariaDB > server, you may need to use: > > mysql> grant all on your-bacula-database-name.* to your-bacula-user > identified by 'your-password'; > > to ensure everything is set up correctly again. > > > Thanks. > -- > Graham Sparks > > > From: Graham Dicker > Sent: 23 December 2021 14:51 > To: bacula-users@lists.sourceforge.net > Subject: [Bacula-users] make_catalog_backup stopped working > > > > Further to my previous post I notice that the user table contains the > following. Is that what it should look like? > > > MariaDB [mysql]> select host,user from user; > > > > > > From: Graham Dicker > Sent: 23 December 2021 14:42 > To: bacula-users@lists.sourceforge.net > Subject: [Bacula-users] make_catalog_backup stopped working > > > Hi all > > > I'm running Bacula on a desk machine with OpenSuse 15.3 and Bacula 11.0.4. > > > The make_catalog_backup command has stopped working following a complete > loss and restore of my Bacula database. > > I don't know how the database vanished but I restored it from the last > successful backup thus: > > > ./bextract -b ../working/BackupCatalog.bsr /media/seagate4tb /tmp > > mysql > > create database bacula; > > use bacula; > > source bacula.sql; > > grant_mysql_privileges > > > But now although my main backup works fine the backup of the catalog gets > this error: > > > 23-Dec 13:39 vivaldi-dir JobId 65: BeforeJob: mysqldump: Got error: 1044: > "Access denied for user ''@'localhost' to database 'bacula'" when selecting > the database > > > > Any clues? Thanks in advance. ___ Bacula-users mailing list 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
Re: [Bacula-users] make_catalog_backup stopped working
Thank you for your reply Graham. I don't think Bacula itself has any problems, it is only the script mysqldump that has a problem. The script is just supposed to create a dump of the database and (if it is successful) then Bacula goes on to first back it up and then delete it. On Thursday, 23 December 2021 15:14:08 GMT Graham Sparks wrote: > Hi. > > I'm surprised your other backups are working--if you have just one database > server, your Bacula director should be using the same credentials to > connect to the database, regardless of the job. > > In your "bacula-dir.conf" file, there will be the username and password that > Bacula uses to connect to the catalogue database: > > e.g. > > > > Catalog { > Name = MyCatalog > dbname = "your-bacula-database-name"; dbuser = "your-bacula-user"; > dbpassword = "your-password" } > > > > > Make sure your database name, user and password match the current catalogue > database settings configured in your bacula-dir.conf. On your MariaDB > server, you may need to use: > > mysql> grant all on your-bacula-database-name.* to your-bacula-user > identified by 'your-password'; > > to ensure everything is set up correctly again. > > > Thanks. > -- > Graham Sparks > > ____________ > From: Graham Dicker > Sent: 23 December 2021 14:51 > To: bacula-users@lists.sourceforge.net > Subject: [Bacula-users] make_catalog_backup stopped working > > > > Further to my previous post I notice that the user table contains the > following. Is that what it should look like? > > > MariaDB [mysql]> select host,user from user; > > > > > > From: Graham Dicker > Sent: 23 December 2021 14:42 > To: bacula-users@lists.sourceforge.net > Subject: [Bacula-users] make_catalog_backup stopped working > > > Hi all > > > I'm running Bacula on a desk machine with OpenSuse 15.3 and Bacula 11.0.4. > > > The make_catalog_backup command has stopped working following a complete > loss and restore of my Bacula database. > > I don't know how the database vanished but I restored it from the last > successful backup thus: > > > ./bextract -b ../working/BackupCatalog.bsr /media/seagate4tb /tmp > > mysql > > create database bacula; > > use bacula; > > source bacula.sql; > > grant_mysql_privileges > > > But now although my main backup works fine the backup of the catalog gets > this error: > > > 23-Dec 13:39 vivaldi-dir JobId 65: BeforeJob: mysqldump: Got error: 1044: > "Access denied for user ''@'localhost' to database 'bacula'" when selecting > the database > > > > Any clues? Thanks in advance. ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
Hi. I'm surprised your other backups are working--if you have just one database server, your Bacula director should be using the same credentials to connect to the database, regardless of the job. In your "bacula-dir.conf" file, there will be the username and password that Bacula uses to connect to the catalogue database: e.g. Catalog { Name = MyCatalog dbname = "your-bacula-database-name"; dbuser = "your-bacula-user"; dbpassword = "your-password" } Make sure your database name, user and password match the current catalogue database settings configured in your bacula-dir.conf. On your MariaDB server, you may need to use: mysql> grant all on your-bacula-database-name.* to your-bacula-user identified by 'your-password'; to ensure everything is set up correctly again. Thanks. -- Graham Sparks From: Graham Dicker Sent: 23 December 2021 14:51 To: bacula-users@lists.sourceforge.net Subject: [Bacula-users] make_catalog_backup stopped working Further to my previous post I notice that the user table contains the following. Is that what it should look like? MariaDB [mysql]> select host,user from user; From: Graham Dicker Sent: 23 December 2021 14:42 To: bacula-users@lists.sourceforge.net Subject: [Bacula-users] make_catalog_backup stopped working Hi all I'm running Bacula on a desk machine with OpenSuse 15.3 and Bacula 11.0.4. The make_catalog_backup command has stopped working following a complete loss and restore of my Bacula database. I don't know how the database vanished but I restored it from the last successful backup thus: ./bextract -b ../working/BackupCatalog.bsr /media/seagate4tb /tmp mysql create database bacula; use bacula; source bacula.sql; grant_mysql_privileges But now although my main backup works fine the backup of the catalog gets this error: 23-Dec 13:39 vivaldi-dir JobId 65: BeforeJob: mysqldump: Got error: 1044: "Access denied for user ''@'localhost' to database 'bacula'" when selecting the database Any clues? Thanks in advance. ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] make_catalog_backup stopped working
Oops I should have replied to my own message. And the leading pipe symbols seem to cause a problem. Sorry about that. MariaDB [mysql]> select host,user from user; +---+-+ Host | User| +---+-+ % | bacula | localhost | | localhost | mariadb.sys | localhost | mysql | localhost | root| vivaldi | | +---+-+ 6 rows in set (0.001 sec) On Thursday, 23 December 2021 14:42:12 GMT Graham Dicker wrote: > Hi all > > I'm running Bacula on a desk machine with OpenSuse 15.3 and Bacula 11.0.4. > > The make_catalog_backup command has stopped working following a complete > loss and restore of my Bacula database. > I don't know how the database vanished but I restored it from the last > successful backup thus: > > ./bextract -b ../working/BackupCatalog.bsr /media/seagate4tb /tmp > mysql > create database bacula; > use bacula; > source bacula.sql; > grant_mysql_privileges > > But now although my main backup works fine the backup of the catalog gets > this error: > > 23-Dec 13:39 vivaldi-dir JobId 65: BeforeJob: mysqldump: Got error: 1044: > "Access denied for user ''@'localhost' to database 'bacula'" when selecting > the database > > Any clues? Thanks in advance. ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] make_catalog_backup stopped working
Further to my previous post I notice that the user table contains the following. Is that what it should look like? MariaDB [mysql]> select host,user from user; ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] make_catalog_backup stopped working
Hi all I'm running Bacula on a desk machine with OpenSuse 15.3 and Bacula 11.0.4. The make_catalog_backup command has stopped working following a complete loss and restore of my Bacula database. I don't know how the database vanished but I restored it from the last successful backup thus: ./bextract -b ../working/BackupCatalog.bsr /media/seagate4tb /tmp mysql create database bacula; use bacula; source bacula.sql; grant_mysql_privileges But now although my main backup works fine the backup of the catalog gets this error: 23-Dec 13:39 vivaldi-dir JobId 65: BeforeJob: mysqldump: Got error: 1044: "Access denied for user ''@'localhost' to database 'bacula'" when selecting the database Any clues? Thanks in advance. ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users