The database-file which needs to be defragmented is specified in the configuration. The first constructor parameter is the database file.
DefragmentConfig config = new DefragmentConfig("database.db4o"); Defragment.Defrag(config);
Dim config As New DefragmentConfig("database.db4o") Defragment.Defrag(config)
The defragmentation process creates a backup of the old database. By default the back-up file has the name of the original database-file with an additional '.backup'-suffix. You can explicitly specify the backup file name with the second constructor parameter.
DefragmentConfig config = new DefragmentConfig("database.db4o", "database.db4o.back"); Defragment.Defrag(config);
Dim config As New DefragmentConfig("database.db4o", "database.db4o.back") Defragment.Defrag(config)