Noticed a strange thing recently and hopefully someone of you might have an answer that can help me (?). I run backup command using crontab and I could see a difference in the file name when the command run via crontab and the command run manually.
When I run the command manually the file name is correct, but when I run via crontab the file name is formatted without most of the parameters.
Command found in crontab:
/usr/sbin/backup -0 -u -f /mnt/aix-backup/$(hostname)-$(date "+%Y.%m.%d-%H.%M.%S")-root-WFB.bk /
Output from command and crontab: (do not mind the strange box at the file name - just a special character in our language)
So I can copy the command line from crontab and run manually and the file is created as expected. As screenshot the issue affects mksysb backup also, I use the same variables for the all the commands
$(hostname)-$(date "+%Y.%m.%d-%H.%M.%S").
------------------------------
Per Hillerström
------------------------------