Solved

Help with creating daily backups in Windows Server 2003 Standard

Posted on 2010-11-25
11
767 Views
Last Modified: 2012-06-21
The organisation I work for have a website.  This runs off two servers.
1) Application Server
2) Database Server

Here are the rough specs:-

Application Server

Dell Single Dual Core Xeon
Windows 2003 Server Standard Edition 32 Bit Edition
2 GB RAM
2 x 250 GB RAID 1 SATA Disks

Database server

Dell Single Quad Core Xeon
Windows 2003 Server Standard Edition 32 Bit
Windows 2003 Server Standard Edition 64 Bit Edition
SQL Server Standard 2005 Edition 1 Proc License*
4 GB RAM
2 x 500 GB RAID 1 SATA Disks

The DB server has SQL server installed I have been able to create a scheduled backup routine at Midnight every day which works fine.

However, on the APP server all I am currently using is the standard windows backup which works fine but overwrites every day so unless I log in and take a manual backup and move it to a differerent folder the backup file just keeps getting overwritten.  Then if we did have a problem which was not noticed and effectively the backup kicks in and takes a backup of bad data over a healthy backup we end up with nothing.

Can anyone advise me of a good backup solution that will create a fresh daily backup that just doesnt simply overwrite.

I need to create the backup to the server itself in the c:/backup/ directory then our hosting provider takes a scheduled backup of that directory every night for us.
0
Comment
Question by:auraorange
11 Comments
 
LVL 10

Expert Comment

by:moon_blue69
ID: 34212820
To help you better could you please give some more details

Do you want to use the windows built-in backup?
Do you want to back up live files or database?
What time of the day is non-production hours?
What is the aprox size of data to be backed up?

Morover there is an option which says append data. select that which will not over write your previous backup. Please see the attached Screen SHot
backup.jpg
0
 
LVL 1

Expert Comment

by:Birgos
ID: 34212833
The easiest way is to rename the backupfile after backup finished. Filename could be something like:
backupname_yymmdd.bkf At the next run of the backup task the original file still remains. But you also should delete files older than xx days otherwise your drive may get full after a while. Here's a script example e.g. backup.cmd (replace xxx with your filename and yyy with the extension of your file):
@ECHO OFF
FOR /F "tokens=1,2,3,4,5 delims=/. " %%a in ('date/T') do set day=%%c%%b%%a
ECHO Rename the backup file with actual day...  > c:\backup\%day%_xxx.log 2>&1
ren c:\backup\xxx.yyy %day%_xxx.yyy >> c:\backup\%day%_xxx.log 2>&1
ECHO Remove backups older than 7 days... >> c:\backup\%day%_xxx.log 2>&1
forfiles /P c:\backup /S /M *.yyy /D -7 /C "cmd /c del /Q @path >> c:\backup\%day%_xxx.log 2>&1"
:end

If you can't execute a batch file after backup finished inside the standard windows backup tool you could use the "Task Scheduler" and schedule the batch-job maybe one or two hour after the backup finished.
0
 
LVL 2

Author Comment

by:auraorange
ID: 34212845
I am happy to use a Windows backup if it lets me create a new backup daily rather than writting over the same file every day.  I will look for the append option!

We are backing up the application files, I assume are the live files but they do not seem affected when I take a manual backup.

We would like our own backup about midnight as our hosting company then does their own backup at 3am

We operate 9am until 5pm so out of these hours no changes will be made to the actual website by employees.

Each backup is only about 350mb and only increases in size slowly compared to the DB backup
0
 
LVL 2

Author Comment

by:auraorange
ID: 34213106
I have checked my original windows backup and I had not got the APPEND option checked, does this mean I will now get a separate backup file each day?

If that is the case my problem is resolved very easily
0
 
LVL 10

Expert Comment

by:moon_blue69
ID: 34213211
No You have to create  a batch file and schedule it to run

http://nitman.com/2010/07/13/how-to-use-ntbackup-create-daily-or-weekly-backup/

See if you can figure out this article. This shows how to do a daily backup or weekly back up.

I will agree with "birgos".

If you need any further help please let me know.
0
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
LVL 2

Author Comment

by:auraorange
ID: 34213232
Birgos:

Sorry your post confuses me somewhat:

This looks similar to coding I used for a manual batch file backup a few years ago
0
 
LVL 10

Expert Comment

by:moon_blue69
ID: 34213289
I am writing the script for you - give me five minutes
0
 
LVL 10

Accepted Solution

by:
moon_blue69 earned 500 total points
ID: 34213334
This is the .bat file i used to backup a folder called c:\bravo to c:\backup i run the batch file thrice and see the screen shot

forfiles /p c:\backup /d -7 /c "cmd /c del @path"      

C:\WINDOWS\system32\ntbackup.exe backup c:\Bravo /j "%date:/=-%-Daily-%COMPUTERNAME%" /f "C:\backup\%date:/=-%-Daily-%COMPUTERNAME%.bkf"


first line is to delete any files older than 7 days from c:\backup

second like will backup all files in the directory c:\bravo to c:\backup and save the file by day- date- and computer name.

I changed the system date to create a scenario

This is the .bat file i used to backup a folder called c:\bravo to c:\backup i run the batch file thrice and see the screen shot

forfiles /p c:\backup /d -7 /c "cmd /c del @path"

C:\WINDOWS\system32\ntbackup.exe backup c:\Bravo /j "%date:/=-%-Daily-%COMPUTERNAME%" /f "C:\backup\%date:/=-%-Daily-%COMPUTERNAME%.bkf"

backup-1.jpg
0
 
LVL 11

Expert Comment

by:mattibutt
ID: 34213921
Btach file is your answer and create some schedule to automate the process
0
 
LVL 2

Author Closing Comment

by:auraorange
ID: 34228903
Thank you for the code, have tested on my own PC and works great!
0
 
LVL 10

Expert Comment

by:moon_blue69
ID: 34228913
You are welcome
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now