Wednesday, July 8, 2015

Export Backup Script on Windows and Linux

Windows Script:
Windows File Name: t24report.bat
set dt=%date:~7,2%.%date:~4,2%.%date:~12,2%
SET NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
C:\app\Administrator\product\11.2.0\dbhome_1\BIN\expdp scott/tiger directory=t24report network_link=t24report dumpfile=t24report_v%dt%.dmp schemas=t24report


Linux Script:
Linux File Name: expdpbc.sh
vdate=nblt24bc_`date '+%d%m%Y%H%M'`
v1=01
v2=02
v3=03
v4=04
expdp t24backup/**** DIRECTORY=dir1 network_link=t24 dumpfile=$vdate%U.dmp logfile=$vdate.log schemas=nblt24 parallel=4 EXCLUDE=STATISTICS CLUSTER=N metrics=y
gzip /t24backup_dump3/soft/$vdate$v1.dmp
gzip /t24backup_dump3/soft/$vdate$v2.dmp
gzip /t24backup_dump3/soft/$vdate$v3.dmp
gzip /t24backup_dump3/soft/$vdate$v4.dmp

No comments:

Post a Comment