I have a server running FreeBSD and a movie jukebox on unix. I need a script to copy folders from FreeBSD to the movie jukebox.
The script needs to check if the file already exists on the server, resume transfer (if possible) and do not overwrite any files, as it will be running on cron.
I've worked on something like this (based on some answers):
ilockfile = /tmp/lockfile_for_backup_script
#check if lockfile exists, if it does, exit
if [ -e $lockfile ] ; then
# ok lockfile doesnt exist, lets crate it
ftp -n $REMOTE $PORT <<_FTP>>$FTPLOG
quote USER $USER
quote PASS $PASSWORD
# ok, we are done, remove lockfile
rm -f $lockfile
Basically it's a incremental backup script through FTP but this script does not support resume functions, it only overwrites everything. Can somebody help me out with my solution or provide another solution?
Thanks a lot, do not hesitate in asking further questions.