views:

60

answers:

1

Hi,

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?

Thanks, Norbert

A: 

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.

Douglas Tosi
The original database file is almost empty, it includes just a bunch of tables (~50), constraints and indexes. Also, IBExpert says the backup file is not a valid database file.
Norbert
The backup file *is not* a copy of the database. It has a different structure and serves a different purpose. It has to be restored to be accessible by client tools such as IBExpert. Tip: search for gbak to learn about backups in firebird.
Douglas Tosi
Thank you! Now I got it. :)
Norbert