Home Forums SQL Server 2005 Backups How take backup without overwriting or Appending the old files RE: How take backup without overwriting or Appending the old files

  • Hi as Dev indicated your best bet would be to script a backup in SQL agent using a time stamp token.

    For example in 2008 to append the machine name, date and time to a backup file name the script would look like this:

    backup database MSDB to disk = N'c:\sql backup\MSDB_$(ESCAPE_NONE(MACH))_$(ESCAPE_NONE(DATE))_$(ESCAPE_NONE(TIME)).BAK'

    go

    In 2000 to append the date to the backup file name it would be:

    backup database MSDB to disk = N'c:\sql backup\MSDBE_[DATE].BAK'

    go

    This switches only work in the agent, if you run in a query you will just append the commands

    For a full list of tokens in job steps see the following link:

    http://msdn.microsoft.com/en-us/library/ms175575.aspx