Links hidden for unregistered users. Login or register Here
is sophisticated file transfer program with command line interface. It supports FTP, HTTP, FISH, SFTP, HTTPS and FTPS protocols. GNU Readline library is used for input.
This is how it works
to get it do
yum install lftp
creat file sync in home dir
lftp -u yourFTPusername,yourpassword ftp.provider.com/MyLinuxPC/
mirror -R -v /var/spool/asterisk/monitor/ .
mirror -R -v /var/spool/asterisk/voicemail/.
then create MyLinuxPC folder in your ftp dir
after that you can run it with
lftp -f ~/ftpsync
All of the files in your chosen folder will be uploaded to FTPdrive. When you next run the command, only the changed files will be uploaded. When you’re happy with the script and once the first upload has completed, you can add the script to your crontab to schedule it to run every hour. Just type the command:
And add the following line to your crontab file:
0 * * * * lftp -f ~/ftpsync
This will tell your system to run the script every hour, on the hour, so your files are being constantly backed up. Make sure you’ve completed that initial upload first though – as if your upload takes more than an hour then you’ll end up with two versions of lftp running and both syncing the same files.
taken from Links hidden for unregistered users. Login or register Here