After designing a simple shell/bash based backup script on my Ubuntu engine and making it work, I’ve uploaded it to my Debian server, which outputs a number of errors while executing it.
What can I do to turn on “error handling” in my Ubuntu machine to make it easier to debug?
-vor-xor bothIf necessary, run the program with something like “su -c ‘sh -v script’ otheruser
You might also want to pipe the result of the bad command, particularly if run by
cron(8), into/bin/logger, perhaps something like:and then go look at /var/log/messages.