Where is vault?

jasimon9
jasimon9
Community Member

Quite a ways back I set my vault to reside in Dropbox. It appears that is no longer the case, as the instance in my Dropbox is out-of-date, and has apparently not been modified since 02-Aug-15. An interestingly, the file at ~/Library/Application Support/1Password 4/Data/ OnePassword.sqlite has a create date of 02-Aug-15, but a last open date of 23-Oct-15. There is a OnePassword.sqlite-shm file at the same location which has a modified and last opened date of 17-Nov-15.

I don't see the procedures for controlling where the vault is and assigning the location to Dropbox. In Preferences > Sync there is only the Primary vault. Your webpage at https://guides.agilebits.com/1password-mac-kb/5/en/topic/data-locations#sync_dropbox explains what happens "when you first enable Dropbox sync", but there are no instructions on how to set it up.

Please advise on where such documentation lives.


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided

Comments

  • littlebobbytables
    littlebobbytables
    1Password Alumni

    Hello @jasimon9,

    So way back in 1Password 3 for Mac the Agile Keychain was your actual vault. You could move the entire vault into Dropbox and from that point your vault was in Dropbox and nowhere else.

    Things changed a lot in 1Password 4 and remains this way in 1Password 5. Now your vault or even vaults (secondary vault support is now a thing) are stored in an encrypted SQLite database file which as you've found is titled OnePassword.sqlite. We kept the Agile Keychain format on though but it was relegated to a sync container. This allowed people to still use 1Password 3 on Macs that couldn't run 1Password 4 but we no longer simply shift the vault into Dropbox. What happens now is the OnePassword.sqlite file is updated when you made additions, deletions and modifications and then we also update the Agile Keychain if you have set up syncing. Each copy connects to this Agile Keychain and syncs the changes it find as and when it can connect.

    To set up Sync with Dropbox that link will help. If you have any questions at all please do ask :smile:

  • jasimon9
    jasimon9
    Community Member

    Thanks for the explanation. Those instructions look straightforward, except for one thing: if I already have the old Agile Keychain in Dropbox, should I delete it first? Are there any other steps that must be done before deleting it? (Because in the old days, that would have deleted your whole vault!)

    Since this might affect at least one other user, I would think either to include a short blurb to handle these aspects on that "Sync with Dropbox" page, or else a link to another page if it is more involved.

  • littlebobbytables
    littlebobbytables
    1Password Alumni

    Hi @jasimon9,

    You are probably best to move the old Agile Keychain from Dropbox to your Desktop until you're happy things are working as intended. At that point you can safely move it to the Trash. As we now use the SQLite database file it means we can create and even delete Agile Keychains at will as long as they were for a vault that is accessible inside a copy of 1Password 4/5. In fact if there are sync issues a tried and true solution can often be to delete the Agile Keychain and have 1Password create a brand new one from scratch. It's one of the aspects of this design that I like - the sync container is not the vault and one can become damaged without harming the other.

    You are correct, the page I linked you to just handles the case of users new to syncing and doesn't handle a few scenarios that might crop up. That's something to consider so thank you.

    If you have any other questions before you start setting up Dropbox sync please do ask :smile:

  • jasimon9
    jasimon9
    Community Member

    I followed the procedure and it seems to have worked. However, in my 1Password app on my iPhone, it now says it cannot find the keychain or vault, and syncing has been disabled. So I on the iPhone app I did Settings > Vaults > Primary > Start Syncing > Sync with Dropbox. It seems to have "taken", but I cannot really tell if it is up to date and is really synced.

    I notice that in settings, the Sync icon has the rotating animation, and the name has changed to "Syncing". I am thinking this is a good sign. However, the number of items seems stuck on the original number; I would expect it to increase as the syncing proceeds.

    I checked a Secure Note in my 1P on my computer that has had recent entries, and it is not yet up to date on the iPhone. I hope that when the syncing has finished that this note will be up to date. I will let you know.

  • jasimon9
    jasimon9
    Community Member

    I also received a notification from Dropbox about a large number of files deleted yesterday. I am guessing this is because of the deletion of the old agile keychain, which to Dropbox looks like a lot of separate files. The files had names similar to the following:

    B023A6A660021D39FC5EB9C3BE400A0B

    and

    B023A6A660021D39FC5EB9C3BE400A0B.def
    Deleted95 bytes
    /1Password.agilekeychain/a/default/thumb/l/B023A6A660021D39FC5EB9C3BE400A0BB023A6A660021D39FC5EB9C3BE400A0B

    When I copied from the Dropbox "Event Details" report, it also picked up the part with the 1Password.agilekeychain, which is not apparent on the page.

    It seems pretty obvious to me that what happened is the deletion of the old keychain and that I should not be concerned. Could you please confirm?

    And once again, all these things would be nice to be included in your documentation, as they would apply to anyone going through this procedure. And why should I have to discover them and wonder about them when a helpful guide would smooth it over?

  • littlebobbytables
    littlebobbytables
    1Password Alumni

    Hi @jasimon9,

    Dropbox uses quite a simply API so while moving a file from one folder to another on your internal storage device might just mean the changing of a pointer in Dropbox it does result in all the files being copied and then the old ones beings deleted. That can result in a lot of adds and deletes because the Agile Keychain isn't a file but a special bundle. It is actually a folder and inside are a series of nested folders. One of those the folders stores the contents of your vault and it's a single file per item. The idea behind this was that additions, deletions or modifications would affect one small file and reduce Dropbox syncing overheads. Bundles are very much an OS X thing, it's how your photo library is stored if you use iPhoto/Photos for example.

    If 1Password for iOS was linked to this Agile Keychain it would suggest it wasn't as out of date as initially suspected. It may be none of this was necessary but it also will have caused no harm. The easiest way to know if everything has settled down would be to create a test item on each device that you sync to and see if all of those items appear everything else. If they do then this is a very strong indication that sync is correctly occurring.

    I shall pass on your comments regarding the documentation. In this instance though it might be whether this is too much information or important for people to know as we genuinely don't see many people enquiring about Dropbox activity. I'm just suggesting the possibility that the document may reduce in accessibility if the majority of the users don't deem it important. That's just an opinion and not one that will be counted when the decision is made as our documents people usually have a pretty good idea of what level the documentation needs to be to ensure various levels of familiarity can use it and I don't presume to know better than them (getting documentation right is tricky).

    I hope the explanation helped.

  • jasimon9
    jasimon9
    Community Member

    The specific actions take as you say may not have been necessary. However, the Dropbox instance as stated in the original question was way out of date and was not synching. So something would have been necessary to give it a "kick".

    However, all of the above is just chatter -- the problem is that the is still no synching. In Dropbox on my Mac, there is a folder called 1Password. And in that is the 1Password.agilekeychain bundle. On my iPhone in Dropbox, the same 1Password and keychain inside it is present. However, in 1P in the iPhone, the contents of the vault are still way out of date.

    So where is the 1P app getting its vault? The only vault visible on the iPhone should be the current one, but the data is from some old version of the vault, which is apparently lost in cyberspace.

  • littlebobbytables
    littlebobbytables
    1Password Alumni
    edited November 2015

    Greetings @jasimon9,

    1Password for iOS is still not syncing? I think we'd better check out a couple of diagnostic reports.

    I would like you to create the following Diagnostic Reports please, one for each device. These guides will assist.

    Please do not post your Diagnostics Report in the forums

    The email address you will want to use is support+forum@agilebits.com.

    When sending the first diagnostic report to the address above it would help immensely if you could include a link to this thread and your forum handle so we can connect the two. For additional diagnostic reports please wait for the automated reply that will be forthcoming. If you either reply to that email or use the email subject as is it will allow our system to link the emails together as belonging to a single issue.

    Once you've sent the reports a post here with the ticket ID will help us to keep an eye out for it. With access to the report we should be able to better assist you :smile:

    PLS-88889-896

  • jasimon9
    jasimon9
    Community Member

    Before doing the above tests, here is more information: looking at Dropbox on the iPhone, it does appear that the Dropbox sync is functioning. The 1Password folder is there, which previously did not exist -- previously it was just the agile.keychain package without a containing folder. Also, drilling down into the package shows that files have recent timestamps.

    However, in looking in the 1P app, the data is very old. Does this tell you what is happening short of doing the diagnostics?

  • jasimon9
    jasimon9
    Community Member

    I went ahead and sent the diagnostics reports as requested rather than waiting for your response to my last.

  • littlebobbytables
    littlebobbytables
    1Password Alumni

    Hello @jasimon9,

    I've reviewed your diagnostic reports and it just took a minute or two to identify the issue so thank you for sending them in. For whatever reason 1Password for iOS is not currently set up to synchronise with Dropbox. The last log referring to Dropbox suggests that it was attempting to connect to a ghost copy of the original Agile Keychain. The logs for both the Mac and iOS device don't go back far enough to say with any certainty so I'm guessing when I suspect Dropbox on your Mac hadn't had enough time to synchronise all the changes before the attempt to connect on your iOS device. It's a plausible explanation but I can't say for sure that is the case.

    Regardless, 1Password for iOS is reporting that sync is not enabled so I believe if you go through the steps again, verifying that Dropbox is reporting the Agile Keychain exists in /1Password/1Password.agilekeychain (the final record has it trying to connect to a phantom Agile Keychain at /1Password.agilekeychain) then the two copies of 1Password should be connected once again.

    Please do keep us updated.

    ref: PLS-88889-896

  • jasimon9
    jasimon9
    Community Member

    I did the sync procedure on iOS again as you suggested. The only vault it found was 1Password/1Password.agilekeychain, which I believe is correct. But then I got a "Vault Discrepancy" message about merging the vaults. Since there were so many paranoiac warning messages, I thought I should confirm that with you before "merging anyway".

    What say you?

  • littlebobbytables
    littlebobbytables
    1Password Alumni

    Hi @jasimon9,

    If 1Password for iOS is now reporting it can only find the /1Password/1Password.agilekeychain that's a good sign, that's the only vault we want it to be able to find.

    I believe merging is exactly what you want to do but to be on the safe side lets approach it as follows.

    1. Launch 1Password for Mac and use the menu option File > Backup so we have a good snapshot here.
    2. Lauch 1Password for iOS and navigate to Settings > Advanced and use the option Create Backup so we have a good snapshot here.
    3. Merge the vaults. We do make the messages sound quite bad but as long as these vaults have been synced at some point the chances are there will be at most one or two conflicts to manually resolve.
    4. Return to 1Password for Mac and we're going to create a Smart Folder or Saved Search. Start by using the menu option File > New Smart Folder.
    5. Ensure the Search: setting at the top is set to All Items.
    6. Change the option currently set to Title to Conflict fields. The line should read Conflict fields are present.
    7. Click the Save button and name this Smart Folder, something like Conflicts or whatever you prefer.

    When you select this Smart Folder from the Sidebar it will list any items with conflict fields and what are they?

    We adopt a conservative approach. We will only merge items from two vaults if they have the same Universally Unique ID (UUID). If they don't we treat the as individual items. They can share the same title, username and password but unless the UUIDs match they're treated as separate items. In these instances you will see duplicates requiring you to manually remove one. When you do this I would recommend ensuring you don't have any unique information held only in one copy. If an item in each vault has the same UUID we will merge the two. Where the data is the same in both it's easy, there is nothing to do. When there is different data in each we will keep one set of the data where it normally resides and place the other set in a custom section titled Conflicts. This way we don't risk throwing anything important away and instead leave it to the user to ensure the good data is kept and the now obsolete data is removed. You would edit an item and either delete the section titled Conflicts or copy the data from the conflicts fields and paste over the wrong data stored above.

    So as you can see, there may be some cleanup required afterwards or it might all go pretty smoothly. Worst case scenario, you have backups from both groups so nothing is irreversible. I would expect a small amount of tidying up will be required but that should be about it. If you have any questions before you start please do ask :smile:

  • jasimon9
    jasimon9
    Community Member

    I followed the steps 1 - 3 above, and got stuck.

    Interestingly, the pre-merge screen said "My Vault" had 856 items, whereas the "Dropbox Vault" has 875 items. (I saved a screenshot of that page). But the 1P on my Mac when backed up says 899 items.

    Then observing the count during the sync process, it went up to 937 items. At that point it displayed the message "Failed to upload to file to Dropbox" and gave a specific file name (again, took a screen shot). It offered "Try Again", so I tried that. Got the same message again.

    I am thinking that it is time to "start over" with a clean install on iOS. Or something like that.

    Please advise.

  • jasimon9
    jasimon9
    Community Member

    Or if the choice was to keep hacking at it, one step might be to figure out which item that file refers to, preserve the information from the item on the Mac, delete that specific item, and try again. But I am thinking as I said above, that there are too many issues now and a clean start would be preferable.

  • Megan
    Megan
    1Password Alumni

    Hi @jasimon9,

    Thanks for your patience as we work through this!

    Then observing the count during the sync process, it went up to 937 items.

    That's not surprising - as little Bobby mentioned above, some of the items may appear as duplicates, simply because we want to ensure that no information is lost when merging. We can advise you on how best to look through your database and sort those out.

    At that point it displayed the message "Failed to upload to file to Dropbox" and gave a specific file name (again, took a screen shot). It offered "Try Again", so I tried that. Got the same message again.

    Sometimes Dropbox limits how quickly data can be uploaded. When you're doing a process that's sync-intensive, you might see that message occasionally, but waiting a while usually resolves it. If you open 1Password on your iOS device now, do you see your complete database?

    I am thinking that it is time to "start over" with a clean install on iOS. Or something like that.

    If that's the way you'd like to proceed, that's definitely an option. Of course, we strongly recommend making a backup on each device before doing so, just in case:

    1. In 1Password for iOS, follow the instructions in our 1Password backups in iTunes to create a backup and store it on your desktop.
    2. Delete 1Password for iOS
    3. Reinstall from the App Store
    4. Set up 1Password as an existing user and link to your keychain in Dropbox.

    (Please note that if you do have a larger database, it may take a while for your data to be fully loaded, and you may see a message from Dropbox - if you're patient it should resolve itself.)

    I hope this helps!

  • jasimon9
    jasimon9
    Community Member

    In fact, it does seem that the vault is now in sync. I have also made changes on each device and it appeared almost immediately on the other device. So maybe it is working properly now.

    What did not happen at the end of the sync process was a nice, warm, fuzzy message saying "it's all good". Or some such. All I got was the failure message, so it did not feel like is was or was going to finish properly.

  • Drew_AG
    Drew_AG
    1Password Alumni

    That's great news @jasimon9, I'm really glad the sync is working well for you now! You should be all set now, but if you have more questions or run into any trouble, just let us know - we're always happy to help! :)

This discussion has been closed.