1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Litle help with Wput (trying to find efficient way for syncing FTP)

Discussion in 'Tomato Firmware' started by n66666611, Dec 1, 2012.

  1. n66666611

    n66666611 Serious Server Member

    First of all I have very very little knowledge in Linux, so don't be crude :p

    What is the context :
    - I have a HD plugged to my RT-N16. I upload pictures to it (via FTP) from my mobile phone. (DONE)
    - I have installed Wput on the RT-N16 (don't ask me how, but it works now) (DONE)

    What I'am trying to do :
    - Upload each new photos sent from my mobile phone to my RT-N16's HD, to an external FTP site. (DONE)
    Here are the commands I have put into Administration/Scheduler to be run every 3 mins... :
    cd /tmp/mnt/Data/media/image/
    wput -N * -l 95K ftp://myFTPloggin:myFTPpass@ftp.myFTP.com/myFTPdirectory
    So it works : every 3 min Wput check if my local HD has new photos and if so then it upload to my external FTP, trying to limit the upload rate to 95Kb/s.(DONE)
    NOTE: its very important that freshly uploaded photos from my phone to the RT-N16's FTP are nearly instatly uploaded to the external FTP.

    What I don't like with my simple script :
    - Since it compare every 3 mins my external FTP folder to the local one, it prevent the local HD to spin down. For example if I don't take any photos with my mobile phone for 2 weeks, my script would have checked remote FTP and local HD for 2 weeks every 3 mins without any reason....

    Question :
    - I was wondering if there is not a better way of doing what I want.

    I realy hope someone can help since I have reach my poor coding limits ;)
  2. n66666611

    n66666611 Serious Server Member

    I didn't thought that was a complex question...

Share This Page