SQL Server部分数据库备份(不包括某些表) [英] SQL Server Partial Database Backup (excluding some tables)
问题描述
我正在管理一个相当大的SQL Server数据库.一些表包含对业务至关重要的数据,并且必须每天在异地备份.但是,我们还拥有其他(读写)表,这些表大约占数据库大小的一半,而这些表对业务不是至关重要的.我想做的是这样的:
I'm managing a reasonably large SQL Server database. Some tables contain data that are business-critical and must be backed up offsite daily. But we also have other (read-write) tables that take up about half the size of the database that aren't business-critical. What I would like to do is something like this:
Primary filegroup: Tables A, B, C --> daily backup
Secondary filegroup: Tables D, E, F --> monthly (or occasional manual) backup
当我尝试对此进行测试时,尝试还原文件组时出现错误.看来我无法单独恢复单个文件组,也无法从不同的时间点恢复不同的文件组.理想情况下,我希望能够首先还原主要文件组(最重要的一个),然后还原次要文件组.我愿意接受辅助文件组上的一些数据丢失.
When I tried to test this, I got errors while trying to restore the filegroups. It looks like I can't restore a single filegroup alone or different file groups from different points in time. Ideally, I'd like to be able to just restore the primary filegroup (the most important one) first, and then restore the secondary one. I'm willing to accept some data loss on the secondary filegroup.
可以做到吗?
推荐答案
为了成功执行部分或零碎的还原策略,您首先需要采用文件组备份策略.如果愿意,您仍然可以一次备份整个数据库,但是备份需要在文件组级别.
In order to succeed with a partial or piecemeal restore strategy, you first need to adopt a Filegroup backup strategy. You can still backup your whole database at one time if you wish, but the backup needs to be at the filegroup level.
有关如何执行文件组备份的详细信息,请参见以下链接: http://msdn.microsoft.com/en-us/library/ms179401(v = sql.105).aspx
Details of how to perform filegroup backups can be found at the following link: http://msdn.microsoft.com/en-us/library/ms179401(v=sql.105).aspx
Details of how to perform a piecemeal restore can be found here http://msdn.microsoft.com/en-us/library/ms177425(v=sql.100).aspx
这篇关于SQL Server部分数据库备份(不包括某些表)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!