#3060 Issue closed
: Configuring bacula recovery environment to use bextract¶
Labels: support / question
, fixed / solved / done
, old version
ZENAdmin-Ops opened issue at 2023-10-29 03:11:¶
-
ReaR version ("/usr/sbin/rear -V"):
2.6 -
If your ReaR version is not the current version, explain why you can't upgrade:
-
OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):
Debian 11 (bullseye) -
ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
OUTPUT=ISO
OUTPUT_URL=file:///home/zen/debian11-recovery.iso
BACKUP=BACULA
BACULA_CONF_DIR=”/opt/bacula/etc”
BACULA_BIN_DIR=”/opt/bacula/bin”
PROGS_BACULA=( bacula-fd bconsole bacula-console bextract bls bscan btape smartctl )
USE_STATIC_NETWORKING="Yes"
IP=192.168.200.41
NM=255.255.255.0
GW=192.168.200.200
-
Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR):
Hyper-V VM -
Description of the issue (ideally so that others can reproduce it):
Currently when I try:
sudo rear mkrescue -v
I am seeing error:
ERROR: Bacula File Daemon is missing
Some latest log messages since the last called script 450_check_BACULA_client_configured.sh:
2023-10-29 14:05:17.322313872 Including prep/BACULA/default/450_check_BACULA_client_configured.sh
/usr/share/rear/lib/_input-output-functions.sh: line 476: type: bacula-fd: not found
I am sure that this is not a bug, rather an error in my current configuration.
I'm hoping to obtain some advice.
My long-term goal is to be able to perform a restore using bextract as
described here:
https://github.com/rear/rear/blob/master/doc/user-guide/04-scenarios.adoc
Perhaps ideally, a largely automated restore.
However, at the moment, as I'm still working out the steps, I want to perform the restore manually, step-by-step.
And specifically, right now, understand what I need to do to resolve the above error.
Thank you.
VW
ZENAdmin-Ops commented at 2023-10-29 03:28:¶
I'm not sure what is going on here, all my entered information is missing?
ZENAdmin-Ops commented at 2023-10-29 21:53:¶
-
ReaR version ("/usr/sbin/rear -V"): 2.6
-
If your ReaR version is not the current version, explain why you can't upgrade:
-
OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"): Debian 11 (bullseye)
-
ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
OUTPUT=ISO
OUTPUT_URL=file:///home/zen/debian11-recovery.iso
BACKUP=BACULA
BACULA_CONF_DIR=”/opt/bacula/etc”
BACULA_BIN_DIR=”/opt/bacula/bin”
PROGS_BACULA=( bacula-fd bconsole bacula-console bextract bls bscan btape smartctl )
USE_STATIC_NETWORKING="Yes"
IP=192.168.200.41
NM=255.255.255.0
GW=192.168.200.200
-
Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR): HyperV
-
Description of the issue (ideally so that others can reproduce it):
Hello,
I'm sure that this is not a bug, rather it is a configuration issue.
I'm trying to configure a Bacula recovery environment as per the scenario described here using https://github.com/rear/rear/blob/master/doc/user-guide/04-scenarios.adoc using bextract.
After advice on how to complete the configuration.
Thanks
VW
- Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):
You can drag-drop log files into this editor to create an attachment
or paste verbatim text like command output or file content
by including it between a leading and a closing line of
three backticks like this:
sudo rear mkrescue -v
Relax-and-Recover 2.6 / Git
Running rear mkrescue (PID 249644)
Using log file: /var/log/rear/rear-debian11.log
Running workflow mkrescue on the normal/original system
Using UEFI Boot Loader for Linux (USING_UEFI_BOOTLOADER=1)
Using autodetected kernel '/boot/vmlinuz-5.10.0-26-amd64' as kernel in the recovery system
ERROR: Bacula File Daemon is missing
Some latest log messages since the last called script 450_check_BACULA_client_configured.sh:
2023-10-30 08:48:45.315230953 Including prep/BACULA/default/450_check_BACULA_client_configured.sh
/usr/share/rear/lib/_input-output-functions.sh: line 476: type: bacula-fd: not found
Aborting due to an error, check /var/log/rear/rear-debian11.log for details
Exiting rear mkrescue (PID 249644) and its descendant processes ...
Running exit tasks
Terminated
jsmeix commented at 2023-10-30 08:06:¶
@ZENAdmin-Ops
only FYI (I did not yet have a look at your issue):
I found out what went wrong why
all your entered information was "missing"
in your initial description here.
Your entered information was not lost.
You changed our template Markdown source text
https://raw.githubusercontent.com/rear/rear/master/.github/ISSUE_TEMPLATE.md
to something like
<!-- Relax-and-Recover (ReaR) Issue Template
[your entered information]
where the initial <!--
is Markdown syntax
for "begin of comment block" so all your entered information
became a Markdown comment which is not shown.
I fixed it by removing the initial line
<!-- Relax-and-Recover (ReaR) Issue Template
When you remove that comment block
<!-- Relax-and-Recover (ReaR) Issue Template
Fill in the following items before submitting a new issue.
(quick response is not guaranteed with free support):
Please use proper GitHub Flavoured Markdown,
see "Basic writing and formatting syntax" at
https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax
-- You can safely remove this comment block
-->
you must remove that whole comment block.
jsmeix commented at 2023-10-30 09:13:¶
@ZENAdmin-Ops
I am not a BACKUP=BACULA user so I cannot actually help
with Bacula backup specific issues.
In general regarding issues with third-party backup tools:
Usually we at ReaR upstream do not use third-party backup tools
so usually we cannot reproduce issues with third-party backup tools.
Nevertheless we try to help as good as we can from plain looking at the code.
In your case I guess the reason might be that you have
PROGS_BACULA=( ... )
which overwrites the defaults contents of the PROGS_BACULA array
from usr/share/rear/conf/default.conf and possibly other places
in ReaR with only what you specified.
Normally users won't overwrite ReaR's defaults
but only append additional things if needed like
PROGS_BACULA+=( this_additional_program that_additional_program )
I see that your
PROGS_BACULA=( ... )
is the same as in usr/share/rear/conf/default.conf
so theoretically this should work, in particular
because both contain 'bacula-fd' so the error message
bacula-fd: not found
seems to indicate that either you don't have a 'bacula-fd'
program installed or you have it installed at a place
where ReaR cannot find it.
I don't know where (i.e. in which path/directory)
the 'bacula-fd' program is normally installed.
The matching piece of code in
prep/BACULA/default/450_check_BACULA_client_configured.sh
in ReaR 2.6 is
has_binary bacula-fd
StopIfError "Bacula File Daemon is missing"
https://github.com/rear/rear/blob/rear-2.6/usr/share/rear/prep/BACULA/default/450_check_BACULA_client_configured.sh
and the has_binary function in lib/_input-output-functions.sh runs
type $bin 1>/dev/null && return 0
so 'type bacula-fd' does not find a 'bacula-fd' command.
ZENAdmin-Ops commented at 2023-10-30 23:32:¶
Hello,
bacula-fd is located at:
/opt/bacula/bin
And I have this entry in local.conf:
BACULA_BIN_DIR=”/opt/bacula/bin”
I have tried commenting out this line:
PROGS_BACULA=( bacula-fd bconsole bacula-console bextract bls bscan
btape smartctl )
Has made no difference
jsmeix commented at 2023-10-31 14:57:¶
@ZENAdmin-Ops
you use ReaR 2.6 where in particular
prep/BACULA/default/400_prep_bacula.sh
https://github.com/rear/rear/blob/rear-2.6/usr/share/rear/prep/BACULA/default/400_prep_bacula.sh
does not yet contain export PATH=$PATH:$BACULA_BIN_DIR
which is in the current one (with much other enhancements)
https://github.com/rear/rear/blob/master/usr/share/rear/prep/BACULA/default/400_prep_bacula.sh
via
https://github.com/rear/rear/commit/d6681f2ed16d2506e89326d4acf403406931d617
and
https://github.com/rear/rear/issues/2152
So you need to upgrade to the current ReaR 2.7.
See
http://relax-and-recover.org/download/
Additionally see the section
"Testing current ReaR upstream GitHub master code" on
https://en.opensuse.org/SDB:Disaster_Recovery
how you can have several ReaR versions in parallel
each one in its own separated directory
without conflicts between each other.
https://en.opensuse.org/SDB:Disaster_Recovery
In general I recommend to try out our latest GitHub master code
because the GitHub master code is the only place where we fix things
and if there are issues it helps when you use exactly the code
where we could fix things.
ZENAdmin-Ops commented at 2023-11-01 00:23:¶
Hello,
I have downloaded Rear 2.7
According to the readme I can install manually via: make install
I try:
sudo make install
I get:
Command not found
I had a look at Makefile, which looks like a script.
So, I tried:
chmod +x Makefile
sudo ./Makefile install
I get:
./Makefile: 4: SHELL: not found
./Makefile: 7: .NOTPARALLEL:: not found
./Makefile: 9: DESTDIR: not found
./Makefile: 10: OFFICIAL: not found
./Makefile: 11: DIST_CONTENT: not found
./Makefile: 14: rearbin: not found
./Makefile: 15: name: not found
./Makefile: 16: rearbin: not found
./Makefile: 16: shell: not found
./Makefile: 16: version: not found
./Makefile: 18: name: not found
./Makefile: 18: version: not found
./Makefile: 18: BUILD_DIR: not found
./Makefile: 20: Syntax error: word unexpected (expecting ")")
Can you clarify how I install this release?
Thanks
jsmeix commented at 2023-11-02 08:29:¶
@ZENAdmin-Ops
neither
http://relax-and-recover.org/download/
nor
https://en.opensuse.org/SDB:Disaster_Recovery
talks about make install
.
The program 'make' is a software development tool
which is primarily meant for software developers.
When you don't have make
installed
try an alternative installation method
that works in your particular environment,
for examples see the above URLs.
I am not a Debian user so I cannot tell you
how to install software on Debian.
For example ReaR 2.7
as openSUSE Build Service package
for Debian 11 for 64-bit x86_64 "amd64" systems
seems to be available as rear_2.7-0_amd64.deb
at
http://download.opensuse.org/repositories/Archiving:/Backup:/Rear/Debian_11/amd64/
Cf. "openSUSE Build Service packages" on
http://relax-and-recover.org/download/
But for testing something I would recommend
"Testing current ReaR upstream GitHub master code",
see what I wrote above.
[Export of Github issue for rear/rear.]