I have a task for synchronizing a remote ftp folder to a local folder. At the remote site, that day’s folder is placed in the form of year_month_day and the local folder placed in the form of year/month/day .
I have to copy the current day’s folder everyday because previous days folders are deleted regularly. In the case of a failure for copying files, the script must continue copying where it left off. So i decided to use wget command, wrote a script for that and put it into the crontab. I hope this helps you in such cases.
Remote ftp site synchronization script:
wget --mirror -nH --cut-dirs=1 -P $local_folder -o $log_file 'ftp://'$user':'$pass@$address'/'$remote_folder