SQL Server - 频繁的数据库备份
我有一项在两个数据库之间同步数据的服务。这是相当危险的,主要是因为这是未经充分测试的新软件。这就是为什么我需要在每次同步之前进行频繁的备份(服务自行执行)。一天后,我得到了 13.9 GB 的备份文件。这实在是太多了。
我正在考虑我的选择是什么以及如何处理这个问题。我试图将此数据库分为两个文件组 - 主文件组和照片文件组。完成此操作后,我得到了 16mb 和 120mb 的文件。这里重要的是备份这 16mb 并能够在需要时恢复它。
我真的不知道这里有什么风险以及会发生什么。谁能简要解释一下或提供链接以便我阅读?
还有哪些其他选择?
(最终目标是我可以用相对较小的备份文件大小进行频繁备份)
I have a service that synchronizes data between two databases. This is quite risky mostly because this is new software that is not very well tested. This is why I need to do frequent backups - before every sync(the service performs that itself). After one day I got 13.9 gb file with backups. This is TOO MUCH.
I'm considering what are my options here and what to do with this. I'm trying to divide this database into two filegroups - primary and photos. After doing this I got 16mb and 120mb files. The important thing here is to backup those 16mb and be able to restore it when needed.
I don't really know what risks are here and what can happen. Can anyone briefly explain or give a link so that I can read?
What other options are there?
(The ultimate goal is that I can backup frequently with relatively small backup file sizes )
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您已用 MSSQL 2008 标记了这个问题。MS
SQL 2008 可以利用 FILESTREAM 来将文件集合存储在文件系统中,而不是作为数据库中的 blob。但是,它保留了跟踪和索引文件位置的能力。
在这种情况下,当您的同步服务执行时,它还应该传输 FILESTREAM 目录的内容。
结果将是您的数据库备份将显着减小,因为它们实际上不包含文件,仅包含数据完整性所需的位置和表。
以下是有关
FILESTREAM
功能的信息链接:http://msdn.microsoft.com/en-我们/library/cc949109(v=sql.100).aspx
You have tagged this question with MSSQL 2008.
MS SQL 2008 can utilize
FILESTREAM
to store collections of files in the filesystem rather than as blobs in the DB. However, it retains the ability to track and index the file locations.In that case, when your sync service executes it should also transfer the contents of the
FILESTREAM
directory.The result will be that your DB backups will be significantly smaller because they don't actually contain the files, just the locations and tables required for data integrity.
Here is an informative link on the
FILESTREAM
feature:http://msdn.microsoft.com/en-us/library/cc949109(v=sql.100).aspx
请不要忘记在进行数据库备份之前收缩日志文件,以避免不必要的磁盘使用。
Please donot forget to shrink the log file before taking the database backup to avoid the unnecessary usage of Disk.