09-24-2007 02:50 PM - edited 07-03-2021 02:40 PM
I am running WCS 4.0 under Linux (RHEL 4) and am trying to figure out how to automatically FTP the most recent backup file off to an external FTP server. I had hoped to use an FTP client to pull the file from WCS as it seems to be running a FTP server but even Cisco TAC can't provide any info on how to login to WCS via FTP. So I guess I'm left with the option of using the FTP client on WCS to copy (put) the file to another FTP server (as opposed to getting it from WCS). I have WCS configured to automatically back itself up every 7 days and to keep 7 versions of the backup. These 7 backup files are stored in /opt/backups/WCSBackup. I need to find a way to copy the most recent file each week to a common file name, such as "WCS_Backup", and then use FTP to copy it off the WCS server to an external FTP server. I figured out how to automate the FTP part using .netrc but am having trouble figuring out the file renaming and copy logic. Any help would be greatly appreciated.
09-25-2007 04:52 AM
If you do a man cp, you will see that there is a backup flag you can use.
"cp --backup"
You can also use cron to schedule it.
09-25-2007 05:28 AM
I was in a rush when I posted earlier. There is also rsync that will easily do what you are asking for.
Here is a sample of a simple backup script
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide