Compact Database Feature


#1

Over time your Codebook database will grow in size. Not only because of adding data, but also as a result of performing many sync operations.

Codebook stores additional information to track changes to your database which assist in making decisions on what to exchange when performing a sync operation. Codebook currently can’t determine when to clean out this tracking information because it’s unknown whether these changes have been synced with all instances of Codebook.

We’ve included a new feature in Codebook for macOS and Codebook for Windows called Compact Database (found under the File menu) which cleans out this tracking information and reclaims space in your database.

You have to sync all your changes with each copy of Codebook before your database can be compacted, or your changes will be lost.

Compacting your database may substantially reduce its size and speed up sync operations.

Here are the steps for how to properly compact your database and have it propagate to all your other copies of Codebook:

  1. Sync every copy of Codebook to ensure that all changes are seen (the Compact Database feature isn’t permitted if you haven’t synced in the last 5 minutes).
  2. Go to File → Compact Database…
  3. If you’re using a Cloud sync provider: Perform an Overwrite operation from the database you just compacted, and then Restore operation from every other device you use Codebook on.
    If you’re using WiFi sync: Perform a Restore operation from every other device you use Codebook on (restoring from the database you just compacted).
    If you’re using Local Folder sync: Perform an Overwrite operation from the database you just compacted. If any other Codebook devices are syncing with the same Local Folder, perform a restore operation from those devices.

That’s it! Continue syncing as regular afterwards.

Note: There should be no need to compact your database frequently. Most likely annually or semiannually is enough.


Codebook for Windows 3.0.21 Released
Codebook for macOS 3.2.6 Released
#2

You did not cover Local Folder Sync. I use that method. My Local Folder happens to be a folder in the local copy of OneDrive. That gets synced to OneDrive. I did your steps 1 and 2. I do the same thing on my other devices and thus they are all actually using the same folder. Especially nice now that we have the new On Demand feature in the latest Windows 10 update. For your step 3, I do the compression on my desktop. Overwrite the Local Folder then go to other devices and restore from Local Folder. With On Demand feature they are all in sync and compressed


#3

@lwetzel

Thanks for posting with this additional information, it will definitely help anyone looking for the info. I’ve updated the post to include Local Folder sync as well.

Cheers,
Micah