I use bareos for my backup at home.
To save energy, i'd like to shutdown the server after the backup of the bareos catalog (last job).
How can i shutdown the server?
When i add this RunAfterJob command in bareos-dir.conf:
RunAfterJob = "/sbin/poweroff"
I get the following error: ... AfterJob: shutdown: Need to be root
many thanks for your help.
I've added:
Client Run After Job = "sh -c '/sbin/shutdown -h +1'"
to the backup-catalog job in bareos-dir.conf
And it works perfectly.
Now i can start the backupserver by the RTC (Bios) and it will shutdown when the last job is finished. Absolutely brilliant!
Greetings
Udo