Scheduled Backup to RDX / RD1000 with SBS 2008 and wbadmin
by Carl Farrington on Jan.20, 2009, under Computer Stuff, Tips & Tricks
@echo off set Logfile="c:\network shares\company\Backup Log.txt" rem Should be called with backup name as parameter, backup will be stored in that backup name's folder. echo. >>%logfile% Echo ***** Backup starting at %date% on %time% >>%logfile% Echo Creating Backup Directory at \\server\rd1000\%* >>%logfile% if not exist "\\server\rd1000\%*" md "\\server\rd1000\%*" >>%logfile% Echo. >>%logfile% Echo ***** Starting Data and System files backup >>%logfile% wbadmin start backup -backuptarget:"\\server\rd1000\%*" -include:c: -quiet >>%logfile% Echo. >>%logfile% Echo ***** Starting Exchange Server Backup >>%logfile% del "C:\Users\Administrator\AppData\Local\Microsoft\Windows NT\NTBackup\data\*.log" ntbackup backup "@C:\Users\Administrator\AppData\Local\Microsoft\Windows NT\NTBackup\data\Exchange.bks" /a /d "Exchange Server" /v:no /r:no /rs:no /hc:off /m normal /j "Exchange Server" /l:s /f "\\server\rd1000\%*\Exchange Server.bkf" type "C:\Users\Administrator\AppData\Local\Microsoft\Windows NT\NTBackup\data\*.log" >>%logfile% echo. >>%logfile% echo ***** Starting IRIS backup >>%logfile% sqlcmd -S SERVER\IRISPRACTICE -Q "BACKUP DATABASE [IRIS] TO DISK = N'\\server\rd1000\%*\IRIS-FUll Backup.bak' WITH NOFORMAT, INIT, NAME = N'IRIS-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10" >>%logfile%
Save the script as c:\dobackup.cmd , and call as “c:\dobackup Daily Backup” or “C:\dobackup Monday” with the Task Scheduler. Obviously make sure there is enough space on your RD1000 for five backups. If not, alter the script or just call it with “Set1″ and “Set2″ instead of Monday, Tuesday, Wednesday etc.
Although it looks like there is nothing there to say “Back up the Exchange IS”, there is an “Application” entry for Exchange in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WindowsServerBackup\Application Support\{76fe1ac4-15f7-4bcd-987e-8e1acb462fb7} , and the output of the backup says “Running consistency check for application Exchange.” This confirms Microsoft’s documentation that SBS’ version of Windows Server Backup does indeed back up Exchange.
Because I am a wuss, and I have no faith, I am also doing an NTBackup of the Exchange IS to a file on the disk. The NTBackup files that you will need to run NTBackup on SBS 2008 can be found here. Extract them to C:\Windows, because there is a VSSAPI.DLL in Windows\System32 that NTBackup doesn’t like. If you extract the files to \Windows, ntbackup will use the VSSAPI.DLL in its own directory.
January 30th, 2009 on 11:02 pm
Hi, I wrote a script similar to this and it worked great. But I am having an issue with not being able to eject the media. Have you had any issues ejecting once the backup is complete?
January 31st, 2009 on 2:28 pm
Are you talking about auto-ejecting, as in the backup script ejecting for you? I have no problems ejecting with the eject button after the backup completes, but only after you have installed the RD1000 driver/utility from the supplied CD. This is what gives the eject functionality.
As for auto-eject, I gave up on that a long time ago. In the days of NT4 it was nice that NTBackup would auto eject after the backup completed, and many customers took it as a good sign that the backup was running. With Windows 2000 & 2003, we had to use “rsm eject /lf”HP SCSI Sequential Device”" or similar, and it wasn’t so good since it would eject even if the backup had failed with “No unused media was available” etc, so I don’t bother with that any more.
February 2nd, 2009 on 6:17 am
I am talking about just the eject button, I will have to double check if the driver/utility is install from the CD. I believe it is. But that gives me a good place to start.
Thanks,
again great article.
April 1st, 2009 on 5:51 pm
Download RDXmon for the RD1000. This creates a service that allows you to manage the RD disk. This is a known issue with RD1000.
April 24th, 2009 on 1:58 am
I believe I am having the same issue as stated above, on 4 different clients!! the RD1000 is locked (something is accessing it) after backup. Only way to eject it is to re-boot the server. I have a symantec guy working with me on this. He says it is a big issue with the RD1000/BE12.
May 9th, 2009 on 2:48 pm
Hi Matthew,
try to exclude the drive letter from your antivirus solution. Often but not always there locks the antivirus the files on the RDX drive.
Kind regards
Patrick
May 23rd, 2009 on 2:53 am
Is there any way to run NTBackup on schedule? I have no problem if I “run it now”, but it scheduled job always fail with error 103 & 203:
Information 23/05/2009 11:23:00 AM 100 Task Started (1) dddf9454-6e83-4fa9-95fa-c5a2e223812d
Error 23/05/2009 11:23:00 AM 203 Action failed to start Launch Failure dddf9454-6e83-4fa9-95fa-c5a2e223812d
Error 23/05/2009 11:23:00 AM 103 Action start failed Run Failure dddf9454-6e83-4fa9-95fa-c5a2e223812d
Information 23/05/2009 11:23:00 AM 319 Task Engine received message to start task (1)
Information 23/05/2009 11:23:00 AM 200 Action started (1) dddf9454-6e83-4fa9-95fa-c5a2e223812d
Information 23/05/2009 11:23:00 AM 107 Task triggered on scheduler Info dddf9454-6e83-4fa9-95fa-c5a2e223812d
======================================================
apart of this: when I go to Job on NTBackup application is chrash.
Is this all because task scheduler try to run it in C:\Windows\system32\NTBACKUP.EXE instead C:\Program Files (x86)\NtBackUp where the program actually situated???
Thanks
Andrew
May 23rd, 2009 on 3:27 am
Whell, the answer for the first part of previous message is YES. Task scheduler has no complains now. However, backup still not working properly. Event log gives an error 8017 “Command Line Problem: A valid backup operation was not specified on the command line.”
Here is information about NTBackup crach:
Problem signature:
Problem Event Name: APPCRASH
Application Name: ntbackup.exe
Application Version: 5.2.3790.3959
Application Timestamp: 45d693ec
Fault Module Name: StackHash_52d4
Fault Module Version: 6.0.6001.18000
Fault Module Timestamp: 4791adec
Exception Code: c0000374
Exception Offset: 00000000000a6e97
OS Version: 6.0.6001.2.1.0.305.9
Locale ID: 3081
Additional Information 1: 52d4
Additional Information 2: b38d3df985bfb7662837be2eb472cc12
Additional Information 3: 5e8e
Additional Information 4: 9fd5a6e5bb46f376718099cb96955150
Cheers
May 27th, 2009 on 10:51 am
Ok, I have replaced the recommended NTBackup with the older version. Now Job is avaiable. However, it doesn’t work again. Now the problem is shadow copy:
——————————————————
Backup Status
Operation: Backup
Active backup destination: File
Media name: “BackupData.bkf created 27/05/2009 at 7:33 PM”
Timeout before function completed
Error returned while creating the volume shadow copy:ffffffff
Aborting Backup.
———————-
The operation did not successfully complete.
———————-
The option for Shadow copy is in gray (so I can not tick it)
I would be very appreciate for good advice.
Thanks
May 27th, 2009 on 10:59 am
Hi Andrew. The NTBackup is just for Exchange. I think it doesn’t work for VSS, so you have to make sure you are only backing up the Exchange IS, not System State or any other files.
October 5th, 2009 on 10:25 pm
Hi Carl:
Im a newbie to SSB 2008. Last week we had a disaster and restored everything back using our external drive back up. We uses Rd1000 for weekly off site back up. After the recovery, the rd1000 is not on the system anymore. I tried re-installing the rd1000 software, scan new hardware but still it wont recognize the rd 1000. Any tricks for the sbs 08 to recognize tthis hw?
thanks in advance,
joan
October 9th, 2009 on 9:42 am
Hi Joan. Maybe you did a BIOS reset on the machine, so the SATA port is disabled in the BIOS.
December 4th, 2009 on 5:25 pm
So I like the idea of where you are going with this but let’s go ahead and combine your working script with the NTBackup script many of us used based on this:
http://weblogs.asp.net/doubinski/archive/2004/07/28/199518.aspx
Now as to running the NTBackup for Exchange how supported is this going to be if you need to do a recovery?
December 7th, 2009 on 8:03 pm
Hi James. I haven’t seen that script before, but a couple of observations:
I used %date% and %time% instead of grepping the output of date /t.
The Net stop/start Removable Storage & RSM refresh stuff is just for tape drives, and is necessary only because RSM is unreliable and needs refreshing god knows how many times else tape backups can fail.
Sleep doesn’t exist as a win32 command as far as I know. I would use ping -t 30 >NUL instead (for a 30sec pause). It has the same effect, except that we don’t need to sleep anyway, because we’re not trying to fix a broken RSM refresh on a tape drive.
So I can’t really see much to combine. Other than adding a blat line at the end for emailing, which is something that I do anyway, although it’s not in the example above.
December 16th, 2009 on 1:45 pm
Carl
Task Scheduler has the option to add an simple email event after tasks have completed in 2008.