Search

Join this Blog for direct reference of any post into your inbox. To join just click on "Join this Site" under "Follower" then Login with your Email.*** DECLARATION: I Maintain this Blog for Helping Myself While at Work and Welcome any body Needing Help!!!.*** CAUTION: Using any of the script from this Blog may contain at Own Risk. These scripts May or May not have been Tested.***

Tuesday, 27 March 2012

Script To Copy or Move Backup from One server to Another


Tested on Windows XP: MyCopy.bat
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
set path=c:\WINDOWS\system32;
echo Copying started at %date% %time%>>_date_.txt
xcopy \\ittest\d$\BACKUP\RMAN\Test \\192.168.14.49\i$\oraback\Check /Y /s /a /d
echo Copying finished at %date% %time%>>_date_.txt
echo Completed Successfully at %date% %time%>>_date_.txt
echo --------------------------------------------------------------------------- >>_date_.txt

@rem The script will copy all the file including hidden and sub directories if the file already existed it will Ignore that file and generate the report time also.


Tested on Windows XP: MyCopy1.bat
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@echo off
xcopy \\ittest\d$\BACKUP\RMAN\Test \\192.168.14.49\i$\oraback\Check /Y /S /E /H
echo Copying finished at %date% %time%>>_date_.txt
echo Completed Successfully at %date% %time%>>_date_.txt
echo --------------------------------------------------------------------------- >>_date_.txt

@rem The script will copy all the file including hidden and subdirectories if the file already existed it will overwrite that file and generate the report time also.

Tested on Windows 7: Myrobo.bat
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ROBOCOPY \\ittest\d$\BACKUP\RMAN\HOTBACKUP \\192.168.14.49\i$\oraback\Check /move /minage:15

@It will Move all before 15 days (Sysdate-15) the files from one server location to another

0 comments:

Post a Comment