Not a stranger to using linux, but never bothered with keeping things synchronized between devices.

I have a laptop, and a desktop both running Arch (I use Arch BTW) and wanted to investigate the best way to synchronize things from device to device. Just to outline some details, both are running KDE on Wayland, both BTRFS, as well as a number of other similarities such as username.

I want to be able to synchronize certain config files, Documents and Files, and was going to go the Syncthing route.

What are you doing, or what would you recommend to setup in order to have parity between two devices?

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    5 months ago

    Unison might be worth a look, provides bidirectional merging and command-line operation. It’s what I’d use if I were mostly working with binary files and didn’t want a history.

    Rsync, which someone else recommended, is really aimed at efficient unidirectional replication, not keeping two directories on computers that are both being changed and are intermittently connected in sync.

    config files

    If there’s mostly text and you’re going to want to review changes, want to keep a history, and do a lot of merging, I’d use git, symlink files to aim at the git repo. I have a custom helper script, but stuff like GNU stow is aimed at this, and I’d probably recommend that someone look at it before rolling their own. Here’s an example of someone using it with git in this role:

    https://ratfactor.com/setup2

    I agree with that guy about using bare git repos as the “master” copy, even if one of the machines in question also hosts the bare repos and technically you have some redundant information on it. Makes life easier, no machine is “special”.

    If I had both binary files (say, a music collection) that I wanted kept in sync without a history and text files that I do (say, my dotfiles), I’d use both.