Hi!
I have a svn backup script that works perfectly if I execute it from the command line but if I set it as a cronjob to run at night, only part of the code works.
So, basically the scripts starts by deleting the folder yesterday and then moves the folder today to the folder yesterday. When that is finished it start the backup.
1st part
#!/bin/sh
date > begin.txt
rm -rv /network/ftp-backup/Svn/Yesterday/*
wait
rm -rv /network/ftp-backup/Svn/svnbackup/Yesterday/.??*
wait
mv -v /network/ftp-backup/Svn/Today/* /network/ftp-backup/Svn/Yesterday/
wait
mv -v /network/ftp-backup/Svn/Today/.??* /network/ftp-backup/Svn/Yesterday/
wait
2nd part
ls -a /esp-server/svn/ > list.txt
cat list.txt | while read x; do
sudo svn-hot-backup /esp-server/svn/$x /network/ftp-backup/Svn/Today
wait
done
wait
date > end.txt
the 1st part does not work from the cronjob table and the second part runs with no problems. I even split the scripts but it still does not run.
Any idea why?
thanks!