Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When SQL Server 2005/2008 database backup jobs are run from Maintenance Plans, can they be configured to include some sequence number (or other indicator) in the filename, so that previous files with the sane name aren't overwritten? (Note I'd like to have just a single database backup in a given backup file.) For example, if my backup job runs and creates:


and then runs again while MyDatabase.bak stil exists, I'd like the new file to be called MyDatabase_1.bak, and so on. If I later delete MyDatabase.bak and the backup job runs, the new backup file should again be called MyDatabase.bak.

share|improve this question
up vote 1 down vote accepted

By default a database backup created from a maintenence plan will create a file based on the database name and timestamp, so a backup of a database named 10x would create a file named 10x_backup_201001062019.bak. I know this doesn't exactly answer your question but it should give you some insight into how backups are named when they're created from a maintenance plan.

share|improve this answer
@joeqwerty: << I know this doesn't exactly answer your question... >> Actually, this exactly answers my question. I'm not sure where I was looking when I asked this question but I created a fresh new maintenance plan and I see the timestamp exactly as you said. Thanks! – Howiecamp Jan 10 '10 at 0:10
Glad to help... – joeqwerty Jan 10 '10 at 0:18

Try using Ola's dedicated maintenance jobs which date and time stamp the backups.

These jobs have many advantages over native maintenance plans - recommended.

share|improve this answer
@SuperCoolMoss - this looks like a great resource, I'm going to check it out. Thank you. – Howiecamp Jan 10 '10 at 0:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.