Firebird .NET:数据库备份不起作用(小文件)
我正在尝试通过代码备份我的 Firebird 2.5 数据库文件:
FbBackup backupSvc = new FbBackup();
backupSvc.ConnectionString = MyConnectionManager.buildConnectionString();
backupSvc.BackupFiles.Add(new FbBackupFile(backupPathFilenameAndExtension, 2048));
backupSvc.Verbose = true;
backupSvc.Options = FbBackupFlags.IgnoreLimbo;
backupSvc.Execute();
数据库保存到指定目录。然而,保存的文件只有168kB大。原始数据库大小近7MB。出了什么问题?
I am trying to backup my Firebird 2.5 database file by code:
FbBackup backupSvc = new FbBackup();
backupSvc.ConnectionString = MyConnectionManager.buildConnectionString();
backupSvc.BackupFiles.Add(new FbBackupFile(backupPathFilenameAndExtension, 2048));
backupSvc.Verbose = true;
backupSvc.Options = FbBackupFlags.IgnoreLimbo;
backupSvc.Execute();
The database gets saved to the specified directory. However, the file saved file is only 168kB large. The original database is nearly 7MB in size. What goes wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
备份文件通常比原始数据库文件小得多。例如,不包含任何索引或旧记录版本。
检查此备份文件是否正确的最佳方法是恢复它并验证数据和元数据。
您也可以尝试使用 gbak 进行备份并比较结果。
A backup file is usually much smaller than the original database file. No indexes or old record versions are included, for example.
The best way to check if this backup file is correct is to restore it and verify the data and metadata.
You may also try to backup using gbak and compare results.