overwrite backup

anushahanna
anushahanna used Ask the Experts™
on
Will backup always replace an existing file.?

Is it better to run "Del 'D:\AGSupply.bak' " before running, on a nightly routine?
BACKUP DATABASE VERIFY to disk='D:\AGSupply.bak'

thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
By default I believe they will be appended. If you want to overwrite your catalog, use the keyword INIT on you BACKUP DATABASE statement.

BACKUP DATABASE 
	[DATABASENAME] 
TO  DISK = N'D:\BackupFolder\BackupFileName.bak' 
WITH 
	NOFORMAT, 
	INIT,  
	NAME = N'[BackupSetName]', 
	SKIP, 
	NOREWIND, 
	NOUNLOAD,  
	STATS = 10
GO

Open in new window

AneeshDatabase Consultant
Top Expert 2009
Commented:
I agree, the default option is NOINIT, you need to mention the INIT option in order to overwrite the existing

Author

Commented:
Thanks to both of you.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial