View Single Post
Old 08-04-2008, 05:24 PM   #11 (permalink)
jeffro01
Thumbs Must Hurt
 
jeffro01's Avatar
 
Join Date: Oct 2006
Location: 67235
Model: 9700
OS: 5.0.0.423
PIN: 2277C472
Carrier: At&t (Company)
Posts: 173
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by hdawg View Post
Code:
@for /f "Tokens=1-4 Delims=/ " %%i in ('date /t') do @set dt=%%l-%%j-%%k-%%i
@for /f "Tokens=1" %%i in ('time /t') do @set tm=-%%i
@set tm=%tm::=-%
@set dtt=%dt%%tm%
@echo Copying backup set: %dtt%.
@echo Please wait...

@if not exist C:\BlackBerryDBBackup mkdir C:\BlackBerryDBBackup
@cd /D C:\BlackBerryDBBackup
@OSQL -E -Q "backup database BESMgmt to disk = 'C:\BlackBerryDBBackup\backup.bak'"
@ren backup.bak "BESMgmt-%dtt%.bak"
Save the code as besmgmt-backup.cmd and schedule it as a task to run on your BES as BESAdmin. It will output a file as such: BESMgmt-2007-10-07-Sun-09-25.bak.

I needed something quick for customers that used MSDE, and I wanted the filename to be as descriptive as possible. You can schedule this, and then use a regular flat-file backup agent to pick up the database backup, and no need for a SQL Agent on the server.
Whats a good method of restore for this type of backup?

Jeff
Offline   Reply With Quote