Hi All,
Thanks in Advance.
My requirement is there are some data files to be updated(some times new files get created) regularly in server A, these files are to be updated to the server B(backup server) by using SCP, I have to write a script for this purpose, before copying the files to server B, the current files in server B to be taken backup in backup floder of server B.
The problem is if the data file is new in server A it will just be copied to server B, if the data file is existing one and has updated in server A the script has to take the backup of existing file in server B & then copy the updated file from server A to server B.
After connecting to the server B using SCP how can I check whether the file is there or not (any conditional checks), then only it will be decided whether to only copy the file or taking the backup and then copy.
Your help will be greatly appreciated.
Thanks,
Raju