Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


Database changes size Depending on where its synched from

J. B.
  • J. B.
    J. B.

    I have a master copy of my database on Dropbox. I have about five other machines with local databases that I sync with it, as well as a couple spares (at work I have a copy on my local machine, and also on a shared drive).

    I have noticed that, for example, when I synched with my Windows XP system today, the saved database size on Dropbox is 4,803,390 bytes. But when I sync my Windows 7 laptop to the same file, it changes to 3,054,446 bytes.

    I can observe this by monitoring the Dropbox folder on both machines. That is, I note the size of the local and Dropbox database on one machine after I sync, then compare it to the local and Dropbox version son the other machine. The local databases both retain their size after the sync. The Dropboix copy changes size depending on which machine synced last.

    I can ping-pong back and forth, and if I don't change anything between syncs, the database will switch back and forth between those two sizes.

    The local copies on the two machines mirror the size that they generate when synched. Both systems use compression, but according to the properties dialog, the on-disk size versus the actual size is the same.

    I haven't detected any problems or data loss, so I don't believe this is creating a problem, but it is a curiosity.

    I looked for a previous note about size, but didn't see one - my apologies if I missed it.


  • Paul

    KeePass compresses the database by default - File > Database Settings > Compression. Different versions of Windows produce differing levels of compression. To confirm this is the issue turn compression off on all databases / computers.


  • steelej

    I have previously reported this anomaly. It does not create any functional problem but the synchronisation does cause replication of new version to the cloud service even when there is no change of content.

    I use TeamDrive rather than DropBox for my cloud server and the free service does not delete historical versions so I have had to go in manually from time to time to clear them out. This has been a minor annoyance but I can live with it (and I no longer have the computer that was the primary culprit).

  • wellread1

    The factors that influence database size and whether a database is "changed" are numerous and beyond the scope of a casual end-user discussion. You may be able to identify several factors simply by observing the behavior of KeePass during normal use. There have also been several discussions on the subject in this forum if you care to search for them. If you really want to fully understand every factor that affects the size of the saved database and when it is deemed "changed" you will need to make an in-depth study of the source code. You will also need to study TeamDrive to determine what attributes it monitors to determine whether a file has changed (e.g. the last modification time).

    To reduce the number of TeamDrive synchronizations you need to reduce the number of unnecessary KeePass saves and syncs to the TeamDrive folder. You can do this with an appropriate combination of one or more of the following practices (not all suggestions are appropriate for all circumstances):

    1. In Tools>Options>Interface(tab)>Main Window(section) Check the option: "Disable 'Save' command (instead of graying it out) if the database hasn't been modified.
    2. Add the "Active database has unsaved changes" condition to all triggers that save or sync to the TeamDrive folder.
    3. Limit synchronization to opening/unlocking and/or closing/locking the database only (e.g. use triggers based one or both events).
    4. Limit synchronization and/or saves to the TeamDrive folder to "when the user deems necessary" (e.g. create a custom button using triggers to save or sync to TeamDrive. Use it as the sole method for updating the TeamDrive folder and save to a local folder outside of Team Drive routinely)