Backing up SQL Server with specific settings

Tags:
SQL Server
SQL Server backup and restore
I have set up my SQL Server backup using the native backup and restore option, but I want to have the files append for 5 days and then have the original file overwritten for the next 5 days. Right now, it's set to append the entire time, and this fills the disks rather quickly. How can I achieve the backup setting I was looking for?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Your best bet is to create a new file. There is no backup setting which will tell the SQL Server to delete a backup from within the backup. You should instead create a new file each time you backup the database and simply delete the files which are older than you want using the <a href=”http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1270919,00.html”>xp_delete_file</a> stored procedure.

A second option would be to create a backup file for each day of the week and overwrite or delete the file each day before backing it up. This will allow you to keep 7 days worth of backups without having to worry about deleting files.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following