You are here: Advanced Features > Defragment > Defragmentation Configuration > Upgrade Database File

Upgrade Database File

This option will upgrade first the database file format and then defragment it. You need to specify a folder where the temporary data for this process is stored.

DefragmentConfig config = new DefragmentConfig("database.db4o");
config.UpgradeFile(Environment.GetEnvironmentVariable("TEMP"));

Defragment.Defrag(config);
DefragmentationConfigurationExamples.cs: Upgrade database version
Dim config As New DefragmentConfig("database.db4o")
config.UpgradeFile(Environment.GetEnvironmentVariable("TEMP"))

Defragment.Defrag(config)
DefragmentationConfigurationExamples.vb: Upgrade database version