Norbert
Norbert

Reputation: 4291

Firebird .NET: Database backup not working (small file)

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?

Upvotes: 1

Views: 596

Answers (1)

Douglas Tosi
Douglas Tosi

Reputation: 2350

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.

Upvotes: 1

Related Questions