0

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:

MyDatabase.bak

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.

2 Answers 2

1

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.

2
  • @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, 2010 at 0:10
  • Glad to help...
    – joeqwerty
    Jan 10, 2010 at 0:18
0

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

http://ola.hallengren.com/

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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