0

I want to use an ftp sync program which would work on either windows or linux that would connect to an ftp server and sync a folder from my computer to it. The catch is you can't see any files inside the ftp server. This means it'll just keep syncing the same files every time.

Is there a program that would upload the file in that folder once and not again, but check hourly or so for another file and then upload it?

1 Answer 1

1

I would suggest a Linux based solution, for ease of scripting and ubiquity of utilities.

  • Install 'wput' on your Linux machine
  • Make the following shell script:
#!/bin/bash
find /path/to/your/files -type f -mmin -60 -printf /tmp/bkup.lst
wput -B -b -a /var/log/wput-backup.log -i /tmp/bkup.lst -basename=/path/to/your/files ftp://user:[email protected]    

... And save it as 'wput-backup.sh'. Make sure you give it execute privileges. Also, change /path/to/your/files to the path where your files to upload will be placed. You will also need to update the user, password, and yourserver.tld to suit your implementation. The find line lists all the files modified in the last 60 minutes and outputs a file listing these files. The wput line uses that file as a list of files to upload.

  • Setup a cron job to run this script every hour or so

Hope this helps.

1
  • Looks good, will test it out when I get some time today :) Thank you very very much :) Commented Oct 12, 2011 at 23:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.