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 (93.182.179.9) 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.
He is a full stack developer, whose favorite languages are currently Python and Vue.js. He is also fluent in Javascript, Flutter/Dart, Perl, PHP, SQL, C and bash shell scripting. He loves Linux, and can often be found tinkering with linux kernel code, and source code for GNU applications. He used to be an active developer on XDA forums, and his tinkered ROMS used to be very popular in the early 2000s.
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.