#2900 Issue closed: Bareos 22 bconsole switch parsing breaking change

Labels: enhancement, fixed / solved / done, external tool

hseagle2015 opened issue at 2022-12-28 07:57:

Relax-and-Recover (ReaR) Issue Template

Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):

  • ReaR version ("/usr/sbin/rear -V"):
    Relax-and-Recover 2.6 / Git

  • OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):
    # lsb release -a
    Distributor ID: Debian
    Description: Debian GNU/Linux 11 (bullseye)
    Release: 11
    Codename: bullseye

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
    # cat /etc/rear/site.conf

BACKUP=BAREOS
BAREOS_FILESET=LinuxAll
GRUB_RESCUE=1
  • Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR):
    KVM

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
    amd64

  • Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):
    GRUB

  • Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
    local SSD

  • Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT"):

# lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT
NAME        KNAME     PKNAME   TRAN TYPE FSTYPE LABEL  SIZE MOUNTPOINT
/dev/sda    /dev/sda                disk              93,1G 
|-/dev/sda1 /dev/sda1 /dev/sda      part swap          1,9G [SWAP]
`-/dev/sda2 /dev/sda2 /dev/sda      part ext4         91,2G /
/dev/sr0    /dev/sr0           ata  rom               1024M
  • Description of the issue (ideally so that others can reproduce it):
    Bareos 22.0.0 (stable) introduced breaking changes in their CLI tools. Bareos changed the way its binaries parse CLI arguments. Four existing options now require two minus signs (--) instead of one (-) .

Since Rear calls bconsole -xc, the latest release of bconsole returns the following error (and exits with 113 exit code):

# rear mkrescue                                                                                                              
ERROR: Director not configured in bconsole                                                                                                                       
Some latest log messages since the last called script 500_check_BAREOS_bconsole_results.sh:                                                     
  2022-12-28 07:30:58.877051019 Including prep/BAREOS/default/500_check_BAREOS_bconsole_results.sh                        
  The -xc and -xs options have changed.                                                                                                                          
  Use --xc and --xs as given in the help.                                                                                                                        
  Run with --help for more information.                                                                                                                          
Aborting due to an error, check /var/log/rear/rear-host-example.log for details                                  
Terminated
  • Workaround, if any:
    It's possible to modify usr/share/rear/prep/BAREOS/default/500_check_BAREOS_bconsole_results.sh and replace bconsole -xc with bconsole --xc, but this will break compatibility with older (still supported) Bareos releases. It would be more appropriate to use the correct switch depending on the bconsole version.

jsmeix commented at 2023-01-02 11:22:

For me it is not a bug but a needed enhancement in ReaR
when ReaR does not yet support incompatible changes
in newer versions of this or that tools.

jsmeix commented at 2023-01-02 11:24:

@hseagle2015
thank you for your issue report and for your fix!

Contributions for third-party backup tool support in ReaR
are much appreciated because we at ReaR upstream
usually do not have those third-party backup tools
so we totally depend on contributions from people
who use and know about third-party backup tools.

jsmeix commented at 2023-01-04 14:16:

With https://github.com/rear/rear/pull/2901 merged
this issue should be fixed.


[Export of Github issue for rear/rear.]