Guys, I am trying to run this logged in as root using the command
sh dbackup.sh
The idea is to put it in Cron.daily, the resulting tarball is collected by the backup server.
If you look at the output it is actually failing on the first line, which probably is causing the cd / to be sent incorrectly.
Next, why bother with such a script when backup contribs are available?
Seems like a simple easy solution that suits our setup.