How to backup your exchange database using scripts and microsoft scheduler
In this article I give you the method I use to backup exchange database using a backup script and windows scheduler.
1) Locate the exchange database
This would normally be located at c:\program files\exchsrvr\mdbdata
2) Create a path to backup to.
mkdir c:\backup
3) Create a new notepad document and paste the following code into it.
------------------------------------------------------
net stop msexchangeis
xcopy "c:\program files\exchsrvr\mdbdata" "c:\backup" /e /c /y /d
net start msexchangeis
pause
-------------------------------------------------------
name this file backup.bat
4) Double click the script and see what happens. NOTE: This will take your server temporarily offline while the copy process is taking place. Depending on the size of your database I have seen a 1.5GB database take 10 minutes to copy across the same drive and upwards of 1 or 2 hours to copy over a network. Make sure that you can be down for that long before trying this.
If the script executes successfully, you should not have a copy of your exchange database and log files in the c:\backup folder. You can of course change the first or second path to suit your needs just don't mess with any of the switches because it may not function properly without it.
5) Run the system scheduler under the control panel, browse to the script and run it every night. The database will be handy if your exchange database ever becomes corrupted.
6) If you want to get fancy with it, consider creating 5 different scripts named mondaybackup, tuesbackup, wedbackup, thubackup, fribackup. You can then run each script on its day with the scheduler and have 5 copies of your database so that you may go back to an earlier time. Just make sure that you have enough hard drive space to keep this much data.

Recent comments
2 years 13 weeks ago
2 years 23 weeks ago
2 years 23 weeks ago
2 years 29 weeks ago
2 years 35 weeks ago
2 years 37 weeks ago
2 years 49 weeks ago
2 years 50 weeks ago
2 years 50 weeks ago
3 years 13 weeks ago