开发者

How to create only one backup file for a SQL Server database

开发者 https://www.devze.com 2023-01-12 11:26 出处:网络
I\'ve created a Back Up Database Task for a few selected databases in my server. What I want to d开发者_运维问答o is to have only one backup file for any database. The new one could overwrite the old

I've created a Back Up Database Task for a few selected databases in my server. What I want to d开发者_运维问答o is to have only one backup file for any database. The new one could overwrite the old one or create a new one and delete the old one, doesn't matter. I've checked Backup set will expire: 2 days but but evidently this doesn't do what I thought it'd do, it keeps creating new backup files every day. How can accomplish this?


I wouldn’t set the backup to expire in 2 days, as this means that you can only restore the backup for two days once the backup expires you can no longer rebuild the database using it.

In the same why you built a maintenance plan to backup the database you can create a maintenance plan to clean up the system and delete backup over x days old. then just run it after your backup plan.


Use a history cleanup task and then pick, remove everything older than 1 day or whatever your desired time frame is

How to create only one backup file for a SQL Server database

0

精彩评论

暂无评论...
验证码 换一张
取 消