Inconsistent erasing of old backup files with v5.1
http://www.red-gate.com/MessageBoard/viewtopic.php?t=4959 v5.0 was not erasing old backup files when using ERASEFILES. I have now installed v5.1 and have discovered that when I provide a list of databases to backup to the sqlbackup extended SP, the old backups are only being deleted for every other database backed up. Here's the Sql used:
exec master..sqlbackup '-SQL "BACKUP LOGS [DatabaseA,DatabaseB,DatabaseC,DatabaseD,DatabaseE] TO DISK = ''\\BackupServer\BackupShare\<DATABASE>\<AUTO>'' WITH NAME=''<AUTO>'', DESCRIPTION=''<AUTO>'', MAXDATABLOCK=524288, ERASEFILES=20, FILEOPTIONS=3, COMPRESSION=3, THREADCOUNT=2, VERIFY, LOGTO=''I:\SqlServerBackup\'', MAILTO_ONERROR = ''[email protected]''"'
I can send the log file to somebody if they'd like to look through it. The OS is Windows 2003 server, 64 bit, and I'm using Sql Server 2005 64 bit. Yes, I'm backing up directly to a remote share, but I also tried backing up locally and then using COPYTO and the same every-other behavior was observed.