You probably don't need it anymore (4 years late), but I'm just updating it, and if someone comes here with the same problem, ask for help.
FTP- , -
#!/bin/bash
#get username and password
USER=username #Your username
PASS=password #Your password
HOST="myftpserver.com" #Keep just the address
LCD="~/Desktop/localfolder" #Your local directory
RCD="/users/user" #FTP server directory
lftp -f "
open $HOST
user $USER $PASS
lcd $LCD
mirror --continue --reverse --delete --verbose $LCD $RCD
bye
"
FTP-, -reverse mirror.
#!/bin/bash
#get username and password
USER=username #Your username
PASS=password #Your password
HOST="myftpserver.com" #Keep just the address
LCD="~/Desktop/localfolder" #Your local directory
RCD="/users/user" #FTP server directory
lftp -f "
open $HOST
user $USER $PASS
lcd $LCD
mirror --continue --delete --verbose $RCD $LCD
bye
"
- , , lftp, -, , script .