WLAN Server with multiple Macs, Folder sync options

Options
System
edited March 2017 in Mac
This discussion was created from comments split from: Syncing 2 macOS computers and 1 iOS device.

Comments

  • webfrasse
    webfrasse
    Community Member
    Options

    Syncing to anything cloud related is simply not an option for lots of users. It breaks corporate policies. That is the case for me. I can only keep the data on encrypted disks / devices I'm in physical control of.

    Having said that the folder sync and then using ChronoSync / Resilio etc to sync my 2 Macs is simply broken. The two Macs immediately gets out of sync. The number of items doesn't match. What does work and what I am doing now is to use my iPhone as sync conduit. After syncing my iPhone both Macs in a round robin pattern all three devices are in sync. Seems to be rock solid.

    Would be cool if you guys could add this very simple pattern to the IOS app. If more than one WLAN server is defined, sync with all of them is a serial way. Seems dead easy.

    Thanks
    Mikael

  • Drew_AG
    Drew_AG
    1Password Alumni
    Options

    Hi @webfrasse,

    The problem and solution you described are a bit different from the questions in the previous discussion, so I've moved your message to a new thread. I hope you don't mind!

    Using the Folder sync option in 1Password on multiple Macs and keeping them in sync with each other with a sync utility / file copy tool via a network drive can be tricky if problems start to happen, as we don't have any control over the sync tool, network drive, etc. In general, if that's not working for you, you'll want to check the sync settings in 1Password on each Mac, and also check the settings of the sync tool to make sure it's keeping your 1Password sync file up to date on both Macs.

    If I understand, the solution you found in order to get everything back in sync was to enable WLAN Server on both Macs and use your iPhone to switch back and forth between them. Although it's possible to do that, we don't recommend it because it requires you to disable & set up WLAN Server on your iPhone each time you want to switch which Mac it syncs with. Each time you do that, it removes a bunch of context data which is used to sync your 1Password vault(s). That context data must be re-created when you set up WLAN Server with the other Mac, which means all your data in 1Password must go through full conflict resolution again (every field of every item in your vault has to be verified in order to determine which data to keep, in case there have been changes). That increases the chances something will go wrong with the sync, so at some point you might end up with some duplicate items, conflicts, or other sync problems.

    If you're unable to use any sort of cloud sync service with 1Password, another option would be to sync your Macs by using the Folder sync option to point to a sync file stored on a USB stick or other removable drive. 1Password can detect when that drive is connected to the Mac, and will sync with it. This doesn't involve the use of any other sync utility or file copy tool - you would just need to remember to connect the drive to a Mac when you want to sync 1Password. (You can still sync one of your Macs with your iPhone via WLAN Server.)

    I hope this helps, but please let us know if you have any questions about that or need anything else. Cheers! :)

  • webfrasse
    webfrasse
    Community Member
    Options

    Hi!

    That's good info about my solution. So far it has worked better than the Folder sync and using tools like ChronoSync or Resilio to keep the two macs in sync.

    What I really wish for is a Bonjour type built in sync like I have for my two instances of DEVONthink Pro. It works very well. The two macs syncs when they appear in the same network. Question on the external drive. Will 1P also keep a local database on each mac and the usb drive is just the sync conduit? I need to look closer at that solution.

    Thanks
    Mikael

  • webfrasse
    webfrasse
    Community Member
    edited March 2017
    Options

    Solved it:-)

    Much better than a USB, I created a small disk image file. Strong encryption adds extra security. This file will mount with the same path on both macs regardless how I sync it. Now I just dropped it in the DEVONthink Pro database so it syncs together with all other data. It's a single file and the date stamp on the disk image decides which way it syncs.

    Thanks
    Mikael

  • Drew_AG
    Drew_AG
    1Password Alumni
    Options

    Hi @webfrasse,

    I'm glad to hear you found a solution that works for you!

    For anyone else who might be reading this, I wanted to reiterate a few notes about the Folder sync option from our support site:

    Notes:

    • We can’t provide support for any third-party sync solutions.
    • 1Password can’t sync to a folder on iOS or Android, but you can use the WLAN server.
    • Only sync to a folder on a local or removable drive, like an external hard drive or USB flash drive. Syncing to a folder on a network volume, like a Time Capsule or other NAS, may cause problems if the device goes offline.

    If you have questions about that, please let us know - we're always happy to help! :)

  • webfrasse
    webfrasse
    Community Member
    Options

    Small update. Since I have ControlPlane installed I configured it to detect when 1Password is running. It then mounts the disk image using a small shell script. Syncing happens and when I close 1Password the disk image is unmounted and it can sync to the other mac when it becomes available. Works like a charm.

    Mikael

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    @webfrasse: That's fascinating. Given the lengths you've gone to to setup this Rube Goldberg (Syncing) Machine, I'd probably get away with assuming you're equally fastidious when it comes to backups. But you know what they say about "assuming": it results in data loss. So if you or anyone else reading this isn't backing up your data, please do so — especially a single link in the chain breaking may cause things to stop working as expected, with unexpected results. :blush:

  • webfrasse
    webfrasse
    Community Member
    edited March 2017
    Options

    Hi Brenty Goldberg-Messerschmidt! You know what the problem is with assuming? It's just that, assuming. How on earth did your big head go from a sync issue to backup strategies? Not even dignifying your assumption with an answer other than the above. Bye.

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    @webfrasse: Sorry about that! I didn't mean to confuse you, but I guess I did get a little bit carried away with my followup. What I mean is that you should backup your data since it could get hosed if something goes wrong with the sync setup you've devised, since there are so many moving parts. Better safe than sorry. Cheers! :)

  • webfrasse
    webfrasse
    Community Member
    Options

    If you had read the whole thread you would have seen the context of why a local sync is needed. Having worked in enterprise IT for about 25 years and the last 15 in Silicon Valley in development for the largest company in the enterprise space I think I have a handle on backups. Advising on backup strategies for our customers is part of what do for a living.

  • Drew_AG
    Drew_AG
    1Password Alumni
    Options

    Hi @webfrasse,

    I'm very sorry if you were offended by his messages! I promise you that wasn't his intent. Obviously (and as Brenty implied), you're very technically inclined, to say the least. But not everyone who might read this discussion is. Your current sync setup is one that we don't support - it works well for you of course, and even if something goes wrong, you're probably capable of solving the problem on your own, even restoring data from a backup if necessary. But these are public forums which means anyone can read them, including customers who don't understand all of this nearly as well as you do. Our warnings & reminders are really for their benefit - we don't recommend they try an advanced & unsupported sync setup like this, but if they do, we want them to take precautions in case anything goes wrong.

    I apologize for any misunderstanding about that! Please let us know if you need anything else, and enjoy the rest of your week. :)

  • webfrasse
    webfrasse
    Community Member
    Options

    It's all ok, I learned my lesson about assumptions in the past and no guarantees I won't go there in the future:-)

    Question on the supportability. Since you support the local folder sync and I don't think you exclude disk image files or indeed USB drives etc. Rather focusing on the way the files are copied, is that a correct statement? Finder ok? Path Finder? Terminal commands that are supported to move a disk image file (the dmg file I'm using), cp, rsync, rsync over ssh? I think you can see where I'm going;-) What exactly is unsupported?

    Thanks
    Mikael

  • Drew_AG
    Drew_AG
    1Password Alumni
    edited March 2017
    Options

    Hi @webfrasse,

    Good questions! The basic functionality of the Folder sync option (i.e. syncing a vault to a .opvault or .agilekeychain file stored locally on the Mac) is of course supported on its own, and that's essentially the same way it works when syncing with Dropbox - 1Password syncs to the local Dropbox folder on the Mac. When using Dropbox, the Dropbox app syncs the .opvault or .agilekeychain file between the Mac and the Dropbox servers, and with other devices. With the Folder sync option, something else is used to do that. (I know you already know this stuff, but I'm just laying the groundwork for the rest of my answer. ;) )

    So, one of the main problems that can happen involves conflict resolution. A .opvault or .agilekeychain sync "file" is really a bundle containing many smaller files, and when you make changes to 1Password on one device, it updates certain files within that bundle. If a conflict happens during a sync and Dropbox (for example) is unable to tell which copy of an item has newer changes, it will create conflict files within the .opvault or .agilekeychain. 1Password is programmed to understand how Dropbox names those files so it can handle them properly (the conflicting data is saved in conflict fields in the item to make sure no data is lost). But other sync services might work differently and name conflict files in a way that 1Password doesn't understand, which can cause sync issues and lost data.

    Many customers who don't use a cloud sync service with Folder sync will instead configure it to point directly to a network drive. One of the main problems with that setup is that 1Password has trouble if that network drive is unavailable, or if it encounters latency or other network issues when trying to sync there. 1Password has gotten better with that, but there are still cases where it tries to read the sync file on the (unavailable) network drive and just hangs for a long time before macOS tells 1Password that it failed to read the file. (On the other hand, pointing Folder sync directly to something like a USB drive is ok because there's an Apple API that notifies 1Password when a USB drive is connected and when it isn't, so 1Password can easily determine when to sync and when not to sync with that USB drive.)

    Now, I don't think the examples I described above necessarily apply to your current setup, but I just wanted to give a couple good examples of why we can't support all possible configurations with Folder sync. Basically, there are too many other factors which we have no control over, or which are simply unsupported in the 1Password app. It's possible you won't run into problems with the way you're currently syncing, but I don't know that for sure because we probably haven't tested that specific setup.

    I hope that helps to answer your questions, but please let us know if you have more! :)

  • webfrasse
    webfrasse
    Community Member
    Options

    Thanks! There was some new info in there, the dropbox conflict handling which I basically expected to be there.

    In my setup though there is only ONE file being synced. There can be no conflict in the .opvault or .agilekeychain as they are stored on a single file system in the .dmg file. It's the .dmg file that is being synced once it's unmounted. Nothing inside it is being synced using any unsupported mechanism. There can be no conflict. It's also not a network drive. It's mounted the second 1Password is started, 1P syncs immediately and I guess at some interval as long as 1P is running. When I close 1P the dmg is unmounted and synced the next time the other mac is available.

    You don't seem to address this in the answer above...

    Thanks
    Mikael

  • Drew_AG
    Drew_AG
    1Password Alumni
    Options

    Hi @webfrasse,

    Sorry if I wasn't clear about that! I tried to address that towards the end of my message but you were probably hoping for something more specific:

    It's possible you won't run into problems with the way you're currently syncing, but I don't know that for sure because we probably haven't tested that specific setup.

    The examples I gave yesterday (conflict resolution/handling, network drive availability) don't seem to apply to your specific sync setup. I was just trying to give a broader understanding of why we can't support third party sync solutions, or sync configurations that we haven't tested and have no control over.

    It sounds like you want me to tell you that your current sync setup will work and continue to work correctly, and/or that it's a "supported" setup, but I can't do that because it's not a setup that we support. But just to be clear, being an "unsupported" sync setup doesn't necessarily mean it won't work - it just means we don't know for sure. 1Password wasn't designed with that particular configuration in mind, and it involves several moving parts outside of 1Password that must all work as expected. We have no control over those moving parts, and we don't know what will happen if something goes wrong with one of them.

    To be fair, I can't think of anything specific about the setup you've described that would cause problems. It sounds like it should work for you - and I truly hope it does! I just wanted to be clear that we've never tested that configuration and can't make any guarantees.

    Hopefully this helps, even if it's not as specific an answer as you may have been hoping for. Have a great weekend! :)

  • webfrasse
    webfrasse
    Community Member
    Options

    Not expecting anything really. I know all to well the difference between "it works" and/or certified/supported. Deals with it every day at work.

    I just wanted to clarify my setup as it wasn't exactly addressed in your response and it's been working great since I configured it. In my mind I just used supported methods as you have described but I configured them in a way that just haven't been tested....yet;-)

    Question. You said before that what I did for a while with using my iPhone as the sync conduit, switching between the two macs wasn't supported/recommended. Why then is the feature there in the IOS app? I saw no warnings against using more than one WLAN server.

    Thanks
    Mikael

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    @webfrasse: That's a good question. 1Password for iOS doesn't have any warnings for syncing with multiple computers because, as with Immortals, "There can be only one": it can only sync with a single server, and there just isn't an option to setup a second. When you "disable" sync with the WLAN Server, you're really disabling it. 1Password throws out everything it knows about the sync state with the old server, and then if you set it up again, it's brand new as far as 1Password is concerned. That's where it can become a problem, because there's no history of prior sync sessions at that point, so you can get conflicts. And we don't want to maintain a history in that case either, since that could have equally undesirable results because the user has intentionally disabled sync to setup a new connection.

    Also, I think Drew's comments about using different tools to sync/copy a 1Password vault could be summarized by saying that not everything handles HFS+ metadata and bundles like this well. You probably have experience with that already, but I'd hate for anyone to stumble across this thread and take it for granted that this could work with just anything, given that our 1Password vaults contain some of our most important data. It sounds like yo've got it well in hand though. :)

  • webfrasse
    webfrasse
    Community Member
    Options

    You can only sync with one at a time, correct. But the word Primary indicates Secondary etc. and indeed there is a switch WLAN server option. I have two WLAN server defined and it's just a click to switch between them. Why? Would indicate it's ok...

    HFS+ is the file system used for all storage for 1P, be it iCloud, Dropbox or Folder Sync so I don't understand that comment. My dmg file is also just a HFS+ file system with strong encryption added. Even more secure than 1P itself. My sync method isn't at any point touching the vault files. It's hidden inside the unmounted disk image which is just a single file being synchronized. If it gets corrupted it can't be opened. Built in protection. The sync methods I use saves copies before replacing the dmg file with a new version.

    Mikael

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    My sync method isn't at any point touching the vault files. It's hidden inside the unmounted disk image which is just a single file being synchronized. If it gets corrupted it can't be opened. Built in protection. The sync methods I use saves copies before replacing the dmg file with a new version.

    @webfrasse: That sounds beautiful. :love:

    HFS+ is the file system used for all storage for 1P, be it iCloud, Dropbox or Folder Sync so I don't understand that comment.

    Ah, sorry. While Dropbox uses the local filesystem (HFS+ on most Macs) on each device, it's using a more traditional database structure on the server side. iCloud sync doesn't use the filesystem at all though, just direct database calls to the CloudKit API. I'm not sure that matters now given the description of your setup, but it's fun to compare and contrast different methods. :)

  • ScatterbotsNY
    ScatterbotsNY
    Community Member
    Options

    I'm another person who avoids many cloud-based services. I found this discussion interesting, just to learn more about some of the issues involved with syncing. The idea of using a disk-image was also a good idea. I also have multiple levels of syncing and backups in place. It's nice that discussions like these are public, so more people get to read the explanations. (but of course that means that the agilebit-replies have to be a bit more careful, because they'll be read by a wide variety of users). Cheers.

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    Indeed, and I love it when a (backup plan) comes together! :sunglasses:

  • webfrasse
    webfrasse
    Community Member
    Options

    Question on iCloud syncing as I haven't used it much. Bad experiences when it was initially launched...

    How does it store files on local disk when you're off-line? I can see the CloudKit API calls working fine when you're online but off-line storage on the local disk?

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    @webfrasse: Oh, no kidding! The first iteration of iCloud was pretty rough. Fortunately the new CloudKit API (introduced with iCloud Drive) that we've been using since iOS and Yosemite in 2014 has been a lot better.

    Anyway, from a developer standpoint, CloudKit works the same regardless of the connection status. We're just making the API calls and the OS handles the rest, queueing the data to be sent as soon as there's internet access (or waiting until there's free bandwidth). As far as the specifics of how this works under the hood with regard to caching, you'd have ask Apple. But everything that 1Password "transmits" (I use quotation marks because it's transparent to us when) is encrypted first regardless of the sync method. iCloud can seem a little awkward because of how little insight we have into it, but the plus side is that we don't have to change anything as Apple improves things on their side over time. Cheers! :)

  • resnick
    resnick
    Community Member
    Options

    So I was not able to glean clearly from this discussion: Is doing Folder Sync using an AFP folder going to work OK? Is the issue that the connection might break during syncing?

  • AGAlumB
    AGAlumB
    1Password Alumni
    edited March 2017
    Options

    @resnick: It's really an unsupported "do at your own risk" sort of thing. Certainly it's possible, but it's not something we recommend since it could result in data corruption or conflicts. And whether or not you try it, it never hurts to backup your data. Cheers! :)

  • resnick
    resnick
    Community Member
    Options

    (Going back to this old thread, since I think it fits here.)

    @brenty: Is there a reason that you don't have WLAN as a sync choice on the Mac version? That is, it would solve any problems of directly syncing between two Macs if one Mac could be the WLAN server and the other could be just another WLAN client like a smartphone or table. Seems like a pretty straightforward thing to implement. Might we see this in the not-too-distant future?

  • Jacob
    Options

    Indeed it would be a nifty feature, but there are a lot of dependencies when it comes to WLAN. The way the network is set up is a huge one, and that's not something we can control. When it comes to an internet connection, that's more straightforward: You can sync your data if you're online, and you can't if you aren't. WLAN is really tough to troubleshoot, and making it more accessible just isn't something we're looking to do right now because for most people, a 1Password.com account or third-party sync service work great.

    If you do want to keep your data offline and still sync computers, you could use folder sync with a LAN server. Troubleshooting this can be tough as well, but it does tend to work well for most people I've talked with. You may find it a great solution for you as well. :)

  • resnick
    resnick
    Community Member
    Options

    @Jacob: Folder sync using AFP is working fine at the moment with one exception: When the file server is offline (e.g., when I'm not connected to the network), I get a steady stream of dialog boxes informing me that the server can't be found. If you could fix that problem, and do a bit of work to avoid the kinds of corruption that @brenty was worried about, I would be happy to simply use that. (I'm not too worried about the latter; my data is being backed up, so if something goes pear-shaped, it shouldn't be a big deal to recover. But it's not that hard to do a bit of file locking to make sure that a shared-over-AFP-folder sync works and make it a fully "supported" feature.)

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    @resnick: Correct. macOS doesn't notify us when a network share goes offline, only a local drive. That's why we advise against doing that:

    So 1Password only finds out that it isn't available when it tries to read or write data. We're not going to stop 1Password from trying to read and write your data as you use the app, as that would automatically result in data loss. A better option would be to use folder sync with a local folder on each Mac and using something like ChronoSync to keep them up to date with each other. But we only support syncing with the local folder (no different from Dropbox) and don't have plans to formally support every configuration that intrepid DIYers come up with.

This discussion has been closed.