Bacula Catalog Backup Failing After Upgrade to FreeBSD 9.2

My Bacula host runs FreeBSD 9.2. Here are the specific Bacula ports installed:

portmaster -l | grep bacula
Code:
===>>> bacula-client-5.2.12_3
===>>> bacula-server-5.2.12_3

Catalog backups were running successfully until I upgraded the OS from 9.1 to 9.2 and applied updates to the installed ports tree and ports accordingly. Here is the error message I began to see in the Bacula log when the catalog backup job was run:
Code:
03-Dec 10:41 aus-nix-backup-dir JobId 1709: BeforeJob: env: perl: No such file or directory

The BeforeJob command is /usr/local/share/bacula/make_catalog_backup.pl MyCatalog. I found that I can run this command both as root and as the bacula user via su -m bacula -c "/usr/local/share/bacula/make_catalog_backup.pl MyCatalog"; however, manually running the job from the Bacula console would also fail and produce the same error.

After changing the first line in /usr/local/share/bacula/make_catalog_backup.pl from
Code:
#!/usr/bin/env perl
to
Code:
#!/usr/local/bin/perl
the catalog backup job runs successfully. Has the nature of /usr/bin/env been changed since FreeBSD 9.1? I also switched from Perl 5.14 to Perl 5.16:

perl -v
Code:
This is perl 5, version 16, subversion 3 (v5.16.3) built for amd64-freebsd-thread-multi

Actually, the change to Perl 5.16 may be the cause of this issue because I did not run into this issue after upgrading another Bacula host to FreeBSD 9.2 several weeks ago; that host is still using Perl 5.14. Has anyone else come across this issue? Should I recommend the modification to /usr/local/share/bacula/make_catalog_backup.pl to the port maintainer?
 
Re: Bacula Catalog Backup Failing After Upgrade to FreeBSD 9

According to /usr/ports/UPDATING Perl 5.16 is now the default version, so I'd say it won't hurt to drop the maintainer a line so (s)he can at least take a closer look at it. The port should either work with Perl 5.16 or explicitly depend on an older version.
 
Re: Bacula Catalog Backup Failing After Upgrade to FreeBSD 9

I am the maintainer. :)

I am confused as to why /usr/bin/env perl works with one version of Perl, but not another.

Any ideas?
 
Re: Bacula Catalog Backup Failing After Upgrade to FreeBSD 9

Could the $PATH variable inside the Bacula console have been changed? The env() man page says that is what is used to find the binary and gives an example that could be used if that isn't the case.

Code:
           #!/usr/bin/env -S -P/usr/local/bin:/usr/bin perl
 
Re: Bacula Catalog Backup Failing After Upgrade to FreeBSD 9

From my understanding, it was Perl which was upgraded, not Bacula, so my gut feeling is: no, things didn't change in Bacula.

One solution: patch the code coming into FreeBSD to a full path to Perl.
 
Back
Top