{"id":5457,"date":"2012-05-09T02:57:34","date_gmt":"2012-05-08T21:27:34","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=5457"},"modified":"2016-12-19T14:36:46","modified_gmt":"2016-12-19T09:06:46","slug":"fetching-file-from-ftp-in-background-with-curl","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/fetching-file-from-ftp-in-background-with-curl\/","title":{"rendered":"Fetching File From FTP in Background With Curl."},"content":{"rendered":"<p>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.<\/p>\n<p>Now I could have simply done \u201cget\u201d  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&#8217;t seem to work .<\/p>\n<p>In comes curl, literally saved my night. With simple command written below I was able to transfer file from ftp server to local machine.<\/p>\n<p>[shell]\u00a0curl ftp:\/\/name:password@server\/file.tar &gt; file.tar[\/shell]<\/p>\n<p>And then it was piece of cake running it in background with nohup<\/p>\n<p>[shell]nohup curl ftp:\/\/name:password@server\/file.tar &gt; file.tar &amp;[\/shell]<\/p>\n<p>Thanks to curl, me and my system were able to get good nights sleep \ud83d\ude42<\/p>\n<div>_________________________________<\/div>\n<div>Hitesh Bhatia<br \/>\n<a href=\"mailto:hitesh@intelligrape.com\" target=\"_blank\">Mail<\/a> LinkedIn,<a href=\"http:\/\/www.facebook.com\/home.php?#%21\/profile.php?id=100000114437286\" target=\"_blank\">Facebook<\/a>,<a href=\"http:\/\/twitter.com\/d1_ricky\" target=\"_blank\">Twitter<\/a><br \/>\n_________________________________<\/div>\n","protected":false},"excerpt":{"rendered":"<p>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 \u201cget\u201d after logging into ftp out server, but that would have required my machine to stay awake all night unattended. Seems simple but everything [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":0},"categories":[1],"tags":[473,814,815,263],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/5457"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=5457"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/5457\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=5457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=5457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=5457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}