How to ftp files from one server to another server....
Every week under /var/tmp/BACKUP new file is generated..
the file size near about 10G. file name like below... backup_root_20120419_122234 backup_root_20120412_122234.. but i need to transfer those files to another server(/root_BACKUP/) weekly basis using ftp script automatically and delete the old files and keep only latest two files.. Can anyone help to make the script and mention the procedure also... |
There are several ways to do that.
Here is some info. You'll have to make it how you want it. http://linux.die.net/man/1/ftp http://linux.die.net/man/1/crontab http://steve-parker.org/sh/sh.shtml Write a shell script with ftp transfering the files http://www.commandlinefu.com/command.../sort-by-votes Make the script executable http://linux.die.net/man/1/chmod Make a crontab that runs that script at the time you desire. http://www.commandlinefu.com/command.../sort-by-votes http://ubuntuforums.org/showthread.php?t=102626 If you want to delete old files you can use find with rm for example. Or you could use a backup program http://www.techrepublic.com/blog/10t...-utilities/895 http://linux.about.com/od/softbackup..._Solutions.htm |
Outstanding answer, teckk.
|
Your welcome.
To the OP here are some more links http://www.cyberciti.biz/tips/rotate...ll-script.html http://www.overclock.net/t/1183361/b...ps-through-ftp There appears to be lots of info posted on that. http://www.google.com/search?q=backu...t%20with%20ftp |
Good Job teckk.. Really helpful... thanks
|
All times are GMT -5. The time now is 12:38 PM. |