Results 1 to 5 of 5

Thread: how to make a Ftp client download a dir

  1. #1
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767

    how to make a Ftp client download a dir

    Just wondering

    I use ncftp as ftp client, but I can't download all files of a dir and all subdirectories in that dir
    On a windows pc, I just can drag and drop files, but in command line it doesn't quite work out

    I want to do this, because I want to backup my webserver every week:

    download several files to the hdd
    put them in a tar archive with name as time and date
    copy the archive to my home webserver and delete the old files


    I know this should be able with cron, but I first need to write the script to download every file
    any ideas someone?

  2. #2
    Join Date
    Nov 2007
    Location
    EU's border...
    Posts
    71
    Just wondering why you don't use man pages for ncftp!
    Use -R for recursive download...
    Like in "ncftp>get -R /Dir_with_subDirs/ "

  3. #3
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by Serpent View Post
    Just wondering why you don't use man pages for ncftp!
    Use -R for recursive download...
    Like in "ncftp>get -R /Dir_with_subDirs/ "
    ah... I just used a giant list with ftp commands, I tought is should be just an ordinary command.

    got some probs with it tough.
    it begins with "tar: short header"
    no idea what it means... as i'm not tarring :P
    and then after about 100 files it says time out
    Could not read reply from control connection -- timed out.
    get /httpdocs/: timed out while waiting for server response.
    I guess a bug or something... I mean... as long as you do some activities on a ftp server you'll stay login
    any ideas?
    btw... I could find no manpages for it

    EDIT:
    The error is made by the hosting company, and hopefully they'll fix it
    I had no problems downloading from a windows ftp server or the own linux ftp server, so I think it's good.
    I still do have the problem that the password or username may not contain spaces...

    and...
    I know that "date" is a command, but how do you make the filename into the date? :S
    Last edited by wpte; 09-04-2008 at 23:49.

  4. #4
    Join Date
    Nov 2007
    Location
    EU's border...
    Posts
    71
    btw... I could find no manpages for it
    If you install man & man-pages on your router you can find them...
    Or use this link:
    man ncftp

  5. #5
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    I still have problems using the program...
    the hosting company fixed the problem and I'm able to download everything on my pc with filezilla without any problems
    now ncftp downloads the whole folder and stops normally after 50 files and says the host disconnected
    What I think is that ncftp first write the files to the local memory and then write them to the directory I set, and then the memory is full and ncftp doesnt know how to handle that....

    this is my script so far:
    ncftp -u username -p password ftp.server.somewhere
    type binary
    set passive yes
    lcd /mnt/temp/ftpfiles/
    get -R /httpdocs
    any suggestions?
    I really would like my backup script working...

Similar Threads

  1. How-to: Use your router as a BitTorrent Client
    By GerardNL in forum WL-700g Tutorials
    Replies: 28
    Last Post: 24-10-2007, 19:38
  2. how to download directory with ftp
    By orszagh_ors in forum WL-700g Q&A
    Replies: 1
    Last Post: 10-08-2007, 00:50
  3. Please help me to open portsfor FTP client
    By take in forum WL-500gP Q&A
    Replies: 0
    Last Post: 05-01-2007, 20:02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •