Erasefiles=1 deleting stuff less than 24 hours old?
BruceB
Posts: 14
I've just started using the erasefiles extension in my backup script and got a nasty surprise when I looked in the backup directory this evening. I was using the following cmd from a batch file -
"C:\Program Files\Red Gate\SQL Backup\SQLBackupC" -SQL "backup database fred to DISK = '<AUTO>' with ERASEFILES=1,MAILTO_ONERROR='xxx@xxx.co.nz'"
and a similar script to make hourly transaction log backups. (It also has erasefiles=1 - is this strictly necessary? The help doesn't distinguish between log and full backups regarding deletion).
It's 10pm here but I don't have any files prior to 2am this morning. They were there this morning.
"C:\Program Files\Red Gate\SQL Backup\SQLBackupC" -SQL "backup database fred to DISK = '<AUTO>' with ERASEFILES=1,MAILTO_ONERROR='xxx@xxx.co.nz'"
and a similar script to make hourly transaction log backups. (It also has erasefiles=1 - is this strictly necessary? The help doesn't distinguish between log and full backups regarding deletion).
It's 10pm here but I don't have any files prior to 2am this morning. They were there this morning.
Comments
My timezone is GMT + 12... could this be freaking out the calculation?
javascript:emoticon(':?')
Confused
SQL Backup Consultant Developer
Associate, Yohz Software
Beyond compression - SQL Backup goodies under the hood, updated for version 8