git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@6972 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
REM $Id:$
|
||||
REM $Id$
|
||||
|
||||
REM
|
||||
REM Use Oracle data pump to export data, zip the dump file and then move it to the
|
||||
@@ -24,8 +24,37 @@ erase %logfile%
|
||||
|
||||
expdp 'sys/fmdidgad@webmip as sysdba' parfile=parfile_data.expdp
|
||||
|
||||
cmd /c /wait "start /low zip %zipfile% %dmpfile% %logfile%"
|
||||
cmd /c start "7-zip files - started %TIME%" /wait /low 7z a %zipfile% %dmpfile% %logfile%
|
||||
|
||||
mkdir %destdir%
|
||||
|
||||
move /Y %zipfile% %destdir% && erase %dmpfile%
|
||||
|
||||
|
||||
REM
|
||||
REM Remove the previous months matching backup
|
||||
REM
|
||||
|
||||
if %mm% LSS 10 (
|
||||
set tmpmm=%mm:~1,1%
|
||||
) else (
|
||||
set tmpmm=%mm%
|
||||
)
|
||||
|
||||
set /a prevmm=%tmpmm% - 1
|
||||
|
||||
if %prevmm% LEQ 0 (
|
||||
set prevmm=112
|
||||
) else (
|
||||
set /a prevmm=100 + %prevmm%
|
||||
)
|
||||
|
||||
if %prevmm% EQU 112 (
|
||||
set /a yyyy=%yyyy% - 1
|
||||
)
|
||||
|
||||
set prevmm=%prevmm:~1,2%
|
||||
set prevzipfile=webmip_expdp_%yyyy%-%prevmm%-%dd%-%hr%.zip
|
||||
set prevdestdir=%destbasedir%\%yyyy%-%prevmm%
|
||||
echo erase %prevdestdir%\%prevzipfile% >> c:\erase_log.txt
|
||||
erase %prevdestdir%\%prevzipfile%
|
||||
|
||||
Reference in New Issue
Block a user