Error returned during backup process similar to:
Server: Msg 60401, Level 18, State 1, Line 0
The number of retained days or expiration date specified for the backup media has not yet passed.
Expiration date: 2009-09-25 00:00:00
Steps to duplicate:
1. Create a backup file using a similar script:
exec master.dbo.xp_backup_database
@database = N'Yosemite',
@backupname = N'Yosemite- Full Database Backup',
@desc = N'Full Backup of Yosemite on 9/24/2009 5:56:22 AM',
@compressionlevel = 1,
@filename = N'D:\Backup\Yosemite_200908231419.bak',
@with = N'SKIP',
@with = N'STATS = 10',
@EXPIRATION = N'20090925'
GO
2. Rerun the above script prior to the expiration date.
Note: The results are the same with or without the parameter @init = 1 However if the parameter @init = 0 is used, the file is not overwritten, the backup is appended to the original file
3. Rerun the above script AFTER the expiration date. The file is created with the specified name, overwriting the original file.
Backup file of this same name has not yet expired and cannot be overwritten.
WORKAROUND:
None. This is the design of LiteSpeed.
For details on the native SQL Server 2005 function, see:http://msdn.microsoft.com/en-us/library/ms188697.aspxand the SQL Server 2005 Books Online topic: BACKUP (Transact-SQL)http://msdn2.microsoft.com/en-us/library/ms186865.aspx