SQL Server - 频繁的数据库备份

发布于 2024-11-05 12:28:29 字数 337 浏览 0 评论 0原文

我有一项在两个数据库之间同步数据的服务。这是相当危险的,主要是因为这是未经充分测试的新软件。这就是为什么我需要在每次同步之前进行频繁的备份(服务自行执行)。一天后,我得到了 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

£烟消云散 2024-11-12 12:28:29

您已用 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

情深已缘浅 2024-11-12 12:28:29

我有一个同步服务
两个数据库之间的数据。这是
相当危险,主要是因为这是新的
没有经过充分测试的软件。
这就是为什么我需要经常做
备份 - 每次同步之前(
服务本身执行该操作)。后
有一天我得到了 13.9 GB 的文件
备份。这太过分了。

请不要忘记在进行数据库备份之前收缩日志文件,以避免不必要的磁盘使用。

USE DatabaseName
GO
DBCC SHRINKFILE(LogFileName, 1)
BACKUP LOG DatabaseName WITH TRUNCATE_ONLY
DBCC SHRINKFILE(LogFile, 1)
GO

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.

Please donot forget to shrink the log file before taking the database backup to avoid the unnecessary usage of Disk.

USE DatabaseName
GO
DBCC SHRINKFILE(LogFileName, 1)
BACKUP LOG DatabaseName WITH TRUNCATE_ONLY
DBCC SHRINKFILE(LogFile, 1)
GO
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文