What are all the 2-byte files in the 1Password.agilekeychain bundle?

jtucker
jtucker
Community Member

I currently use Dropbox syncing between two Macs. I had disabled Dropbox temporarily to troubleshoot an unrelated issue and just re-enabled it this morning. I had not changed 1Password syncing during this time so it was still "syncing" to the still-existing Dropbox folder on my Mac.

Because I'd had trouble with Dropbox conflicts in the past, I checked inside the keychain bundle and noticed that I have 407 of 739 *.1password files that are 2 bytes long. All of them were modified on either Mar 6 or Mar 12 of 2015. The changes on each day were at the same time (different for each day, however). None of them are Dropbox conflicted files.

I only have 307 entries in my 1Password database. What are these files? Can I safely remove them?

Comments

  • jtucker
    jtucker
    Community Member

    Update: I turned off Dropbox sync on both Macs, deleting the keychain on Dropbox and re-enabled on both. The 2-byte files are gone, but that brings new questions:

    My vault has 301 active entries, 2 user-created smart folders and 8 items in the trash.

    I did an export of the vault and can tell that it has 311 entries -- the two smart folders plus the 309 regular items, matching the numbers above.

    However, the contents of the keychain on Dropbox has 323 *.1password files (plus the the ".keys" and the two ".js" files).

    So, why are there more entries in the bundle than show in, or export from, the database? Is that expected or does it represent some kind of error?

  • littlebobbytables
    littlebobbytables
    1Password Alumni

    Hi @jtucker,

    The two byte files were what we refer to tombstones. When you move an item to the Trash (in 1Password) we keep the entire item because the purpose of Trash is you can recover the item at any time. Now if you clear Trash you're saying you want these items completely deleted. Now you're syncing so we need to way to tell the other copies of 1Password that these items are deleted. It might sound a little odd but let me explain.

    Say you create a new item on Mac A.

    1. Mac A sees the .agilekeychain doesn't have an entry for this item so it creates a new .1password file for it.
    2. Mac B sees the .agilekeychain has a .1password file it doesn't have a corresponding item for so it adds it to the local vault.

    If when we truly deleted an item we simply deleted it from the .agilekeychain how does 1Password differentiate between this being an item to remove from the local vault or an item in the local vault that it needs to add to the .agilekeychain? The answer is we keep a two byte file that basically acts as a flag to say this UUID was used but is now deleted and so all copies of 1Password know to delete it.

    I wouldn't worry about the specific contents of the .agilekeychain unless you have a syncing issue where two copies of 1Password are not reporting the same vault.

    Does that help at all? If you have any follow up questions do please ask.

  • jtucker
    jtucker
    Community Member

    Thanks, that makes perfect sense.

    I've wondered how Chronosync handles that same problem: how does it know a missing file was deleted and thus it should delete the copy on the other location, not copy it back to where it had been deleted versus it's a file that's new and thus SHOULD be copied. I'm not positive, but I think they handle it correctly though it's a mystery how.

  • littlebobbytables
    littlebobbytables
    1Password Alumni

    Hi @jtucker,

    I don't know specifically how ChronoSync stores this data but yes, it does record certain sync related information and it views a deletion as a file that isn't there but they have a previous record for. So it's the same concept as a tombstone but handled differently at the implementation level.

This discussion has been closed.