yes that fixed the error.
i have another issue now.
on another server, I am backing up a folder under /usr/local/ directory with this script, and here the script fails (in cron and normal execution both).
but for another directory, cron is working.
what can be the issue here? i have lot of free disk space.