Jump to content

Server Backup Script


arrowpc

Recommended Posts

Hi everyone.  First Post here but have watched alot of episodes.

I have recently discovered scripting but this one bakes my noodle.

I have a big client for my computer business that I have just built a server for, well the customer has just informed me that they would now

like to do automated back-ups to an external HDD.

So the problem that I face is I have only ever played with this script that I found here :

@echo off

:: variables

set drive=D:Backup

set backupcmd=xcopy /s /c /d /e /h /i /r /k /y

echo ### Backing up Documents. . .

%backupcmd% "%USERPROFILE%" "%drive%Arrow"

echo ### Backing up Favorites. . .

%backupcmd% "%USERPROFILE%Favorites" "%drive%Favorites"

echo ### Backing up email and contacts (MS Outlook). . .

%backupcmd% "%USERPROFILE%Local SettingsApplication DataMicrosoftOutlook" "%drive%Outlook"

:: use below syntax to backup other directories. . .

:: %backupcmd% ". . . source directory. . . " "%drive%. . . destination dir. . . "

echo Backup Complete!

@pause

:: change to the destination drive first

D:

:: your parent backup directory

drive=D:Backup

echo ### Searching for files to clean up. . .

cd %drive%

dir /s/b/ad cookies > %drive%cleanup. txt

dir /s/b/ad temp > %drive%cleanup. txt

dir /s/b/ad history > %drive%cleanup. txt

echo ### Deleting cookies, temp files and history from backup dir

for /f "delims=" %%J in (%drive%cleanup. txt) do rd "%%J" /Q/S

echo Cleanup complete

@pause

which I have modified to work under vista instead of xp.

So the question that I have is can i use this script for there auto backup or does it need to be modified ?

They would like all of the information backed up for each user on the server including e-mail's ( basically friggin everything ).

Can you PLEASE help me i have tried to mod the script above but just cannot get it to work.

PLease Please Please HELP !!!!!!

P. S this script needs to be FULLY automated with no user interactrion what so ever as no-one has any acces to the administrator accountr other than me.

Thanks in advance.

Link to comment
Share on other sites

if your doing this in vista you can just use the backup and recovery center.

It will only backup what filetypes you want it to, and allows you to easily restore the files.  It will also compress them for you.

You can either backup to a network drive or another hard drive.

I use it and it works great.

As for your script it is simply using xcopy to copy all the files from a directory to d:backup  if you don't have a d: drive or a folder called backup then it wont work.

then it finds all the files that have been deleted from the computer but not the backup location

Link to comment
Share on other sites

Server 2K3 comes with NTBACKUP

Under Start -> All Programs -> Accessories -> System Tools -> Backup

Supports Snap Shots (Shadow Volume)

Really we need more detail your want to backup just the server? Ok Data is fine, but email? Exchange Server? NTBackup can do all of this, its sounds like you need some commerical software, I personally would not recommend simply copying files.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...