본문으로 바로가기

백업 스크립트 (bat)

category 시스템/Windows 2015. 12. 14. 13:27
반응형

 

=== backup_test.bat ===

rem ::::::::::::::::::::::::::::: MS-SQL ::::::::::::::::::::::::::::::::::
echo off

rem =======================================================================
alzip -a c:\_backup\db_database c:\_backup\110_db_backup.alz
ncftpput -u sysbackup -p backup00 000.000.000.000 day\1_sun c:\_backup\110_db_backup.alz
del c:\_backup\110_db_backup.alz
rem =======================================================================

rem ::::::::::::::::::::::::::::: source ::::::::::::::::::::::::::::::::::

rem =======================================================================
alzip -a C:\www\website.co.kr c:\_backup\110_e-bizmall_backup.alz
ncftpput -u sysbackup -p backup00 000.000.000.000 day\1_sun c:\_backup\110_website.co.kr_backup.alz
del c:\_backup\110_website.co.kr_backup.alz
rem =======================================================================

 

 

=== mirror_test.bat ===

set PATH=c:\_backup\cwrsync;%PATH%
set CYGWIN=tty binmode
set TERM=ansi
set RSYNC_RSH=/cygdrive/c/_backup/cwrsync/bin/ssh.exe
set USERNAME=sysbackup
set HOME=c:\_backup\cwrsync

c:\_backup\cwrsync\bin\rsync -av --delete "/cygdrive/c/_backup/db_incham" sysbackup@000.000.000.000:day/110 > c:\_backup\cwrsync\log\"%date%"-mirror_log_website_db.txt
c:\_backup\cwrsync\bin\rsync -av --delete --exclude=JUNO --exclude=study "/cygdrive/c/www/" sysbackup@000.000.000.000:day/110/www/1day > c:\_backup\cwrsync\log\"%date%"-mirror_log_website_www.txt

반응형