>>>>> On Fri, 7 May 2021 16:24:23 +0200, Peter Milesson said: > > On 2021-05-07 16:05, Martin Simmons wrote: > >>>>>> 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 > > > Hi Martin, > > The output of dbcheck is absolutely OK. However, the script does not > pickup the contents of the working_dir= line. There is a variable $wd in > the script, which got the fixed value /opt/bacula/working, but I don't > see any assignment from the proper field in the $dir_conf variable to $wd. > > I'll let it be for now, as it is a quite outdated version of Bacula > (9.2.2). I will upgrade to the latest version in the 9-series, and stay > with it until it's time to send the backup computer to /dev/null (which > will be sometime close to the end of this year).
Ah, right, that was a bug in older versions (see https://bugs.bacula.org/view.php?id=2487). __Martin _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users