Yeah, I know it's classic. I've googled it all around, but still it doesn't work. I have the following script:
#First go to SVN repo folder cd $svnrepos # Just make sure we have write access to backup-folder if [ -d "$bakdest" ] && [ -w "$bakdest" ] ; then # Now $repo has folder names = project names for repo in *; do # do svn dump for each project echo "Taking backup/svndump for: $repo" echo "Executing : svnadmin dump $repo > $bakdest/$repo-$bakdate.svn.dump \n" # Now finally execute the backup svnadmin dump $repo > $bakdest/$repo-$bakdate.svn.dump # You can go an extra mile by applying tar-gz compression to svn-dumps # We also would like to save the dump to remote place/usb # USB/other directory exists, copy the dump there echo "Going to copy $repo dump to $baktousb directory...\n" /usr/bin/scp -v $bakdest/$repo-$bakdate.svn.dump $baktousb/$repo-$bakdate.svn.dump done else echo "Unable to continue SVN backup process." echo "$bakdest is *NOT* a directory or you do not have write permission." fi # End of backup script echo "\n\n=================================" echo " - Backup Complete, THANK YOU :-]"
everything works fine in shell, but when It's executed as cron job it simply doesn't scp (but does create a backup). Yes, I have an empty paraphrase. Can't get why it doesn't work.