Video Screencast Help
Give us your opinion and win with Symantec! Please help us by taking this survey to tell us about your experience with Symantec Connect, so that we can continue to grow and improve.  Take the survey.

Altiris Database Backup with Date/Time Stamp in File Name

Created: 25 Sep 2007 | 4 comments
daggy_b's picture
0 0 Votes
Login to vote

A couple of weeks ago I was looking at the backup options on our SQL servers and noticed that we didn't have very good backups of our Altiris database. I wanted to have a backup taken multiple times throught out the day with the date and timestamp in the filename so I had an easy way to know where to go back to.

I started playing with scripting this and came up with something that works well. Basically, I am just defining a variable and having that variable be the location where I want the backup to be written, plus have it concatenate the date/time stamp on the end of the filename. Then I just have it backup the Altiris database to that variable location.

Here is what the script looks like:

declare @Filename varchar(100)

set @Filename = 'c:\database\Altiris_' + convert(varchar(20),getdate(),110) + '.bak'

print @Filename

backup database Altiris
	to disk = @Filename
	with init

Comments 4 CommentsJump to latest comment

cnpalmer75's picture

I use a standard SQL Maint. Plan to backup all the DB's on the server on a daily basis. SQL automatically names the backup file with a .bak extension and stamps it with the DB name and a time/date stamp.

If you setup the plan for daily frequency you can also adjust how many time a day the backup runs and how many hours in between runs.

This would be much easier in my opinion than running a script to perform the same tasks.

This way you can also backup your transaction logs at the same time to recover to a point in time in case there were any pending transactions that did not get processed if and when the DB crashes.

Benjamin Z. Palmer
Architect | Workspace Design | The Hartford | Simsbury, CT 06082

Benjamin Palmer
Specialist | Client Design
Director | Symantec CT User Group

If you find this post helpful please give it a thumbs up!
If you find that this solves your problem please mark it as the solu

0
Login to vote
daggy_b's picture

Thanks for the comment. I do know about the SQL Maintence plan now, although when I was playing with this script I did not. I agree it does work well and is easier to use. I thought wanted to share my script with others.
Thanks
Curt

0
Login to vote
cnpalmer75's picture

I got it now. Doesn't that always seem to happen though, you get something working that solve a problem and something comes around that gets built right into the product.
Benjamin Z. Palmer
Architect | Workspace Design | The Hartford | Simsbury, CT 06082

Benjamin Palmer
Specialist | Client Design
Director | Symantec CT User Group

If you find this post helpful please give it a thumbs up!
If you find that this solves your problem please mark it as the solu

0
Login to vote
Kris1011's picture

Hi , can any one help with process of how to take a backup on Altiris DB ???

It has got SQL 2005 on it.

Please help

0
Login to vote