Configuration Sync

  • Date: 2018-02-13
  • Status: Implemented

Introduction

Core SSH has no means to sync configuration between computers, this ability was already requested by lots of users, following solutions are favored:

Problem

The most headache problem of sync is conflicts – sync is deeply asynchronous.

Let’s say you’ve two Macs, Mac A and Mac B. When the app’s configuration is changed on Mac A, it needs to be updated on Mac B. In the meantime, you can’t guarantee that the configuration remains untouched on Mac B. It could be changed or deleted, which is when conflicts arise.

Unfortunately, none of iCloud Drive, Dropbox and BitTorrent Sync provides a general solution to solve the conflicts without user intervention.

Proposed solution

Handles the conflicts inside the app, after internal data structure for configuration is stabilized.

As long as configurations are in simple text files it’s doable for anyone to sync between machines. I use both BitTorrent (Resilio Sync) and ChronoSync. Both can handle file conflicts by not overwriting files (archive copy that would be overwritten) or simply choose the newest copy.

Another idea is to let each machine have a uniquely named config file and let the app on each host monitor the config directory and do the merge configs internally. Maybe that’s what’s being implied in the proposed solution. It’s also possible to not merge the files and just let the end user import/load another hosts config file that is present locally by any manual method of choice.

Mikael

Thanks for advices!

Choosing the newest copy actual doesn’t solve conflicts, it seems to me. If Mac A modifies the configuration and later Mac B, both offline, when they get back online, select newest is equivalent to overwrite.

As an end user, I think it’s not acceptable if sync requires user intervention, it should happen silently and automatically.

We’re going to merge the conflicts inside the app as your 2nd advice, but in a different way. Instead of doing hard work to merge configuration file, it’s much practicable to merge changelogs come from different Macs.

Unlike SSH Tunnel, Core Tunnel was born with sync prepared, you shouldn’t have long to wait :wink:

Hi!

I don’t think I suggested that the newest file would solve any conflicts. Merely that it’s a choice the end user can do knowing which file to keep. ChronoSync lets you set this and it also shows such a conflict as it happens and lets you decide. In some cases you actually may not want to merge a messy setup from a machine you played around with or simple messed up. I agree the default should do it silently and automatically. I recently had a situation with ftp clients merging bookmarks and it was a mess and the syncing just made it worse. Same thing has also happened multiple times using multiple machines and multiple browser trying to keep bookmarks in order. Leaving some manual options in there might not be an altogether bad idea.

Also if the syncing will only work with cloud options, dropbox, iCloud etc. I will not be able to use it at all. Our policy doesn’t allow for ANYTHING work related to be stored outside our firewall so if there is no manual method just using local files that I manage it’s DOA for me.

Thanks
Mikael

Thank you for elaborating. Have added Local Folder to the proposal to reflect your use case.
Let’s first make sync progress “user invisible”, to see if it works.