Software and setup to keep a PC and MacBook synced over a network folder
December 4, 2018 7:21 PM   Subscribe

I've got a MacBook and a PC, and a folder on each that I'd like to keep more or less synced. I also have a SMB/SAMBA/CIFS folder that I can usually access on my network or by VPN. What the best way to keep files synced between these computers (without a cloud service like Dropbox)?

Basically, can I get something to reliably run rsync (or something similar) at regular intervals on whichever machine I'm using? I'm the only one who uses either of these machines. The folder just has documents like text files, MS Word files, and Excel files.
posted by Tehhund to Computers & Internet (7 answers total) 5 users marked this as a favorite
 
Unison works well for this.
posted by flabdablet at 7:28 PM on December 4, 2018 [3 favorites]


Unison may work, but if you might also try a version control system like git/subversion. Either way the tool will requires some manual intervention if you touch the same file on two different machines for a binary file, or the same line(s) for a text file. That's just the nature of these things, the program can't figure out which one you want to keep on its own.
posted by axiom at 9:45 PM on December 4, 2018 [2 favorites]


Syncthing is ideal for this. Setup is not quite as simple as I hope it will one day be, but once you've got it working, you can forget about it; it just plugs away, doing exactly what you expect.
posted by /\/\/\/ at 10:50 PM on December 4, 2018 [1 favorite]


I use Resilio Sync (free version) for this. It's as seamless as Dropbox but everything is stored locally and not in the cloud.
posted by the long dark teatime of the soul at 1:48 AM on December 5, 2018 [1 favorite]


Well, the Windows Subsystem for Linux should give you a Bash shell & rsync, just like OS X has. Not very polished, I admit, but funcitonal.

Here's a thread about someone writing a script to do incremental backups with Windows 10's WSL and rsync: https://superuser.com/questions/1245978/using-rsync-on-wsl-bash-for-windows-10-for-incremental-backups

(Not that your problem is their problem, just a demonstration that it's being done elsewhere.)
posted by wenestvedt at 8:42 AM on December 5, 2018


So.. I am a guy with Win, Linux, and Mac on my network. The server is running linux, and has rsync setup for daily backups from other machines in the house. One thing I found is that Rsync itself is a pain on a Win box (my work computer) to the point that I finally gave up. What I finally ended up doing was running Owncloud (or NextCloud as an alternative) on the server. There are clients for all the usual OS choices, and as a bonus I can access via phone easily.
posted by niteHawk at 9:51 AM on December 5, 2018


If you've got some kind of central storage with plenty of capacity, and as well as loose sync you're also looking for point-in-time restoration ability, another package well worth looking at is Borg.

It's a backup and archiving tool rather than a sync tool per se, but its standout feature is efficient data de-duplication. This works by analyzing file content using a rolling-checksum method similar to that used by rsync, but it also does this across files so it doesn't care at all which file(s) that content occurs in.

If you've got a bunch of workstations across which a bunch of files are duplicated, and you perform a complete Borg backup of each of them in turn to a common Borg repository, then the repository will occupy an amount of space that's very close to the minimum required to allow full reconstruction of each of those workstations' content later.

Essentially, the repository will grow to the size of the data on the first workstation you backed up (though probably even less than that, because internal data duplication is a thing as well on most workstations), plus the size of the differences between what's on the first workstation you backed up and what's on those done subsequently.

When you then back up each of your workstations again, the repository will only grow by roughly the size of the difference between what's on them now and what used to be on them before - and unlike Time Machine, where any modification to any file causes the backup drive to get a whole new copy of the entire file, all that the Borg repository will get added to it is actual new data.

This means that it's completely practical to use it to take multiple snapshots of e.g. virtual machine disk images: it won't grab a whole new copy of a potentially multi-gigabyte image file, just those parts of it containing data it's never seen anywhere before. And if you've got ten different VM disk images and each of them has e.g. a complete Windows installation on it, the Borg repo will de-duplicate those as well even though the disk layout within each of those image files is going to be different.

Borg also provides a tool that allows you to mount one of its backup archives as a read-only filesystem, which makes it super-easy to get at anything you backed up to it.

So for your loose sync use case, you could back up each workstation to a Borg repository as a matter of course, last thing before shutting it down; this would typically be fairly quick because relatively little will have changed since last time. Then you'd be able to update any file or folder you were about to work on from a Borg-mounted instance of the most recent archive made on the last workstation you modified it on.
posted by flabdablet at 5:06 AM on December 6, 2018


« Older The care and keeping of showers   |   What was that 'fake letters to companies' blog... Newer »
This thread is closed to new comments.