I'm trying to write a database backup statement that will overwrite the existing backup but I'm not having any luck. I've tried various combinations of the INIT, FORMAT, and RETAINDAYS =x clauses but the backup seems to always append to the existing file instead of overwriting/recreating it.

What is the correct statement to use to achieve this?


You should be able to use WITH INIT provided that the name of the backup that you are taking matches the name within the backup.

  • That did it. I tried the INIT clause before and it didn't seem to be working but after trying it again, everything looks OK. Thanks much. – joeqwerty Apr 26 '12 at 23:53
  • no problem, happy to help. – mrdenny Apr 27 '12 at 0:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.