Every day I need to upload automatically about 100 images with a total size of 4MB.
I've used ncfttput and FTP via command line, but sometimes the upload of one image gets stuck with a Connecting to port message, and so it stops the FTP-upload of the others.
I'm currently using this script:
#!/bin/bash cd /home/giacomo/WRF/DOMAINS/puglia/postprd ftp -i -n -v <<EOF open "server" user "username" "password" binary cd /www.example.org/wrf mput 2mTemp*.gif quit EOF sleep 10 ftp -i -n -v <<EOF open "server" user "username" "password" binary cd /www.example.org/wrf mput 850mbRH*.gif quit EOF etc...
How could I set a timeout with a consequential retry? Or is there a non-command line method to manage all of this automatically (sync my local folder with my remote folder and take care of any errors)?