I have a script to backup by database that runs daily.
Code:
CHECKPOINT;
declare @filename varchar(1000)
set @filename = '..filepath..\MyDB - ' + CAST(DATENAME(dw,getDate()) as varchar) + '.backup'
BACKUP DATABASE MyDB
TO DISK = @filename
This names the backup files with the day of the week. That way I always have a week's worth of backups. However, these backup files are getting huge. I'm pretty sure that the files are getting appended, not overwritten.
That is, when "MyDB - Friday.backup" gets created, the data is appended to the file from the previous Friday - it doesn't outright replace it. Is there a way to overwrite the file?
Thanks in advance for your comments.
- - - - - - - - - - - - - - - - - - - - - - -
In God we trust, everything else we test.