You are here: Advanced Features > Defragment > Defragmentation Configuration > Delete The Backup

Delete The Backup

The defragmentation process copies the data from the old database to a new file. The old file is left as a backup. You can force the defragmentation process to delete the backup after a successful defragmenting.

DefragmentConfig config = new DefragmentConfig("database.db4o");
config.ForceBackupDelete(true);

Defragment.Defrag(config);
DefragmentationConfigurationExamples.cs: Delete the backup after the defragmentation process
Dim config As New DefragmentConfig("database.db4o")
config.ForceBackupDelete(True)

Defragment.Defrag(config)
DefragmentationConfigurationExamples.vb: Delete the backup after the defragmentation process