恢复完整的外部 ESENT 备份
我已经编写了使用 JetBeginExternalBackup API 创建 ESENT 数据库的完整备份的代码。
按照 MSDN 指南,我备份了 JetGetAttachInfo 和 JetGetLogInfo 返回的每个文件。
我已经进行了备份,删除了旧数据库,并将备份数据复制到数据库文件夹中。 数据库引擎无法启动,JetInit 错误代码为“JET_errMissingLogFile”。
我检查了备份,它只包含数据库文件和“
有什么办法可以恢复这样的备份吗?
我不想使用 JetExternalRestore API,因为它太复杂:我不需要恢复到另一个位置,我不明白为什么有 3 个输入文件夹而不是 2 个,而且我不知道要提供的值在 genLow 和 genHigh 参数中。
我确实需要外部备份:ESENT 数据库由远程服务器上的 ASP.NET 使用,我通过 Internet 对其进行备份。
或者,也许有一种方法可以检索当前日志文件的名称,而我应该将其添加到备份中?
提前致谢!
PS 我没有权限跨 Web 服务器上的进程,因此不能选择使用 eseutil.exe。
I've wrote the code that creates full backups of my ESENT database, using JetBeginExternalBackup API.
Following the MSDN guidelines, I backed up every file returned by JetGetAttachInfo and JetGetLogInfo.
I've made the backup, erased old database, and copied the backup data to the database folder.
The DB engine was unable to start, the JetInit error code is "JET_errMissingLogFile".
I've checked the backup, it only contains the database file, and "<inst>XXXXX.log" log files. It lacks the current log file (I'm using circular logging, BTW).
Is there any way to restore such backup?
I don't want to use JetExternalRestore API because it's too complex: I don't need to restore to another location, I don't understand why there're 3 input folders not 2, and I don't know the values to supply in genLow and genHigh arguments.
I do need external backups: the ESENT database is used by ASP.NET on a remote server, and I'm backing it up over the Internet.
Or, maybe there's a way to retrieve the name of the current log file, and I should just add it to the backup?
Thanks in advance!
P.S. I've got no permissions to span processes on my web server, so using eseutil.exe is not an option.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将所有备份文件解压到一个文件夹中。
获取主数据库文件的名称。将扩展名替换为
.pat
。使用该名称创建零长度文件,例如database.pat
。完成这个简单的步骤后,调用 JetRestoreInstance API ,它将从该文件夹恢复备份。
Unpack all backed up files to a single folder.
Take the name of your main database file. Replace extension to
.pat
. Create zero-length file with that name, e.g.database.pat
.After this simple step, call JetRestoreInstance API, it will restore the backup from that folder.