UnixServerAdmin

Server Administration & Management

backup_via_network.bat

@echo off

REM ———
REM BACKUP
REM ———
ECHO ——————————————————-
ECHO CLOSE ALL PROGRAMS and APPLICATIONS NOW!!
ECHO ——————————————————-
ECHO.
ECHO Your hard drive is about to be searched for Documents,
ECHO Databases, Spreadsheets, and Email storage files.
ECHO.
ECHO All files of these types will be saved to
ECHO your REMOVABLE DEVICE in their original
ECHO directories\folders.
ECHO.
ECHO This will replace any previous backup on the
ECHO removable drive.
ECHO.

pause

set mm=%date:~4,2%
set dd=%date:~7,2%
set yy=%date:~10,4%
net use \\192.168.1.2
md \\192.168.0.2\backup\%mm%-%dd%-%yy%
xcopy c:\backup\data\* \\backup\datasrv\%mm%-%dd%-%yy% /e

Advertisements

May 27, 2013 - Posted by | Shell Script, Windows | ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: