Fetching File From FTP in Background With Curl.

09 / May / 2012 by Hitesh Bhatia 0 comments

Last night I had to restore file with size greater than 220GB from our backup FTP server to our main server after OS re installation.

Now I could have simply done “get” after logging into ftp out server, but that would have required my machine to stay awake all night unattended. Seems simple but everything I tried didn’t seem to work .

In comes curl, literally saved my night. With simple command written below I was able to transfer file from ftp server to local machine.

 curl ftp://name:password@server/file.tar > file.tar

And then it was piece of cake running it in background with nohup

nohup curl ftp://name:password@server/file.tar > file.tar &

Thanks to curl, me and my system were able to get good nights sleep :)

_________________________________
Hitesh Bhatia
Mail LinkedIn,Facebook,Twitter
_________________________________
FOUND THIS USEFUL? SHARE IT

Leave a comment -