How to overwrite SQL Server Backup rather than Append Mediaset
In this post I will show you how to overwrite sql server backup file rather than append (default action is append to backup media set)
If you try below t-sql command to take full sql server database backup then you should see backup file. Note the size after backup is complete. Now try to run same command again.. after backup is completed you will notice file size almost double. This is because of default action is append to existing backup media set.
Backup SQL Server Database using Append Option (Default)
backup database northwind to disk='c:\test\northwind.bak' --OR-- (below same as above- append data to backup file) backup database northwind to disk='c:\test\northwind.bak' WITH NOINIT
Backup SQL Server Database using Overwrite option
backup database northwind to disk='c:\test\northwind-overwrite.bak' with INIT