You can test your config by using the command
bareos-dir -t -d100
here a script to run tests before starting the services:
---------8<---------------------
#!/bin/bash
# Purpose: Test config and restart bareos services.
# Interrupt in case of running services.
# Script created: 2019 /bdu
# Last update: 13.06.2020 /bdu
###################################################
echo
printf "%*s" $(tput cols) |tr " " "=\n"
echo "==> Testing bareos-sd..."
/usr/sbin/bareos-sd -t
echo Done.
echo
printf "%*s" $(tput cols) |tr " " "=\n"
echo "==> Testing bareos-fd..."
/usr/sbin/bareos-fd -t
echo Done.
echo
printf "%*s" $(tput cols) |tr " " "=\n"
echo "== > Testing bareos-dir..."
/usr/sbin/bareos-dir -t
echo Done.
printf "%*s" $(tput cols) |tr " " "=\n"
echo
echo
echo "Restart all services now? (sleeping some seconds, so you might
interrupt)"
for ((k = 0; k <= 10 ; k++))
do
echo -n "[ "
for ((i = 0 ; i <= k; i++)); do echo -n "###"; done
for ((j = i ; j <= 10 ; j++)); do echo -n " "; done
v=$((k * 10))
echo -n " ] "
echo -n "$v %" $'\r'
sleep 1
done
echo
# Check if there are actually jobs running. Exit the script if there is
at least one running job:
RJOBS=echo echo list jobs | bconsole | awk '{print $19}' |grep R |awk
'{print $1}' > run-bj
RJOBS=`cat run-bj`
if [[ $RJOBS != "" ]]; then
echo
echo "!!!! THERE ARE ACTUALLY SOME BACKUP JOBS RUNNING. Script
canceled. Please restart later !!!" && exit 1;
echo
else echo "No running jobs found, continuing..."
fi
rm run-bj
echo
echo Restarting bareos services...
/bin/systemctl restart bareos-dir bareos-sd bareos-fd
echo Done.
---------8<----------------
regards,
Birgit
> --
> You received this message because you are subscribed to the Google
> Groups "bareos-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
bareos-users...@googlegroups.com
> <mailto:
bareos-users...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/bareos-users/32319ed3-4414-49e7-8238-17a6cca56406n%40googlegroups.com
> <
https://groups.google.com/d/msgid/bareos-users/32319ed3-4414-49e7-8238-17a6cca56406n%40googlegroups.com?utm_medium=email&utm_source=footer>.