>>>>> On Fri, 7 May 2021 13:40:03 +0200, Peter Milesson said: > > On 2021-05-07 13:12, Martin Simmons wrote: > >>>>>> On Fri, 7 May 2021 12:37:32 +0200, Peter Milesson said: > >> On 2021-05-07 12:01, Martin Simmons wrote: > >>>>>>>> On Thu, 6 May 2021 21:54:54 +0200, Peter Milesson said: > >>>> On 2021-05-06 15:51, Josip Deanovic wrote: >>>>> On Wednesday 2021-05-05 20:53:42 Peter Milesson wrote: > >>>>>> Hi folks, > >>>>>> > >>>>>> After upgrading to Bacula 9.2.2, the following backup error occurs when > >>>>>> the daily catalog backup is run: >>>>> [...] > >>>>> > >>>>>> The normal backups seem to terminate without any errors. It's quite > >>>>>> clear that the bacula.sql file cannot be created or written, which > >>>>>> triggers the error message. The spool directory /spool/bacula is > >>>>>> otherwise used by Bacula during normal backups without any error > >>>>>> messages. The directory /spool/bacula is owned by bacula:bacula and > >>>>>> with > >>>>>> permissions 0750. > >>>>>> > >>>>>> I assume that the MySQL database bacula is backed up in this job. If it > >>>>>> is so, I do not worry very much, as there is a cron job run separately, > >>>>>> that backs up the bacula database to an external server. > >>>>>> > >>>>>> I'm grateful for any input concerning this problem. >>>>> Hello! > >>>>> >>>>> Are you sure it is not defined in your FileSet named "Catalog"? > >>>>> > >>>>> >>>>> Regards! > >>>>> > >>>> Hi Josip, > >>>> > >>>> It worked under Bacula 9.0.6. I'm using the same configuration files, > >>>> just with tweaks for different paths. The bacula.sql file is defined in > >>>> the FileSet named "Catalog" as /spool/bacula/bacula.sql. So it really > >>>> should work. I will try an even later version during the weekend. > >>> What is the WorkingDirectory in your bacula-dir.conf? The > >>> make_catalog_backup.pl script writes to bacula.sql file to that directory. > >>> > >>> __Martin > >>> > >> Hi Martin, > >> > >> The working directory is the same, that is /spool/bacula > >> > >> There is about 2TB free space in the /spool volume, so that is not the > >> bottleneck. Probably the bacula.sql file is not created at all, as the > >> Catalog backup terminates within a few seconds. If I start a regular > >> backup on the bacula database (mysqldump), it runs for at least a couple > >> of minutes. At least I assume the bacula.sql file is a backup of the > >> bacula database. I'm no expert in Perl, so with my little knowledge, it > >> seems to be the case. Do bacula-dir use the wrong permissions (uid, gid) > >> when creating the file? > > Yes, bacula.sql file is a backup of the bacula database when it works :-) > > > > bacula-dir runs as whatever uid/gid you pass on the command line (you can > > check with ps). > > > > I would expect to see any permission errors in the bacula log if > > make_catalog_backup.pl fails. > > > > You could edit the make_catalog_backup.pl to print the command by looking > > for > > the line like this: > > > > exec("HOME='$wd' mysqldump -f --opt $args{db_name} > > > '$wd/$args{db_name}.sql'"); > > > > and adding a copy of this line before the exec line with exec replaced by > > print. > > > > Also, make_catalog_backup.pl should create the file /spool/bacula/.my.cnf > > containing the MySQL connection details from bacula-dir.conf so check that > > these are correct. > > > > __Martin > Hi Martin, > > Problem solved. The working path in make_catalog_backup.pl was hardcoded > to /opt/bacula/working and not assigned from the dbcheck command output. > I just replaced the faulty path with /spool/bacula, and run the catalog > backup without errors. > > Thanks for pointing me in the right direction.
Glad that worked. Any idea what went wrong with the output of dbcheck? Did it contain the working_dir= line? __Martin _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users