bar top left
bar top right
left curve
right curve
Welcome, Guest
Go to bottom
Post Reply
Post New Topic
Page: 1
TOPIC: FTP backup and sync with lftp
#75859
FTP backup and sync with lftp 2 Years, 1 Month ago Karma: -1
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
nano ftpsync

lftp -u yourFTPusername,yourpassword ftp.provider.com/MyLinuxPC/
mirror -R -v /var/spool/asterisk/monitor/ .
mirror -R -v /var/spool/asterisk/voicemail/.
quit

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:

crontab -e

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
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
ccccp
Fresh Boarder
Posts: 29
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2011/04/06 15:18 By ccccp.
Reply Quote
 
Go to top
Post Reply
Post New Topic
Page: 1
Moderators: Bob, jgutierrez

elastix

Protected by Spam Fighter