I will be using lftp instead of regular ftp. Since I would like to automate the process using cron, I will be using a script file for the list of commands.
First create the script file:
#cat ../dforcescript.lftp open -u username,password ftp.droid-force.com mirror backups ./
Here, I have specified that once logged in, the directory backups is to be mirrored to a directory backups in the current directory. The trailing / indicates that the directory name is to be recreated here.
Now execute lftp with:
#lftp -f ../dforcescript.lftp ---- Connecting to ftp.droid-force.com (220.127.116.11) port 21 <--- 220 ProFTPD 1.3.3a Server (freja.c0urier.net) [::ffff:10.1.0.10] <--- 230 User [email protected] logged in <--- 250 CWD command successful
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.