File Sync Between macOS and Ubuntu

Discussion in 'Mac Basics and Help' started by 1123884, Dec 1, 2018.

  1. 1123884 Suspended

    Joined:
    Mar 20, 2018
    #1
    Hi!

    I like using Terminal with ZSH. I use it on two computers: Macbook Air with macOS Mojave and PC with Ubuntu 18.10.

    I'd like to sync my .zshrc file between those computers to have the same aliases and other stuff on both.

    I need a solution for local network (system solution would be the best, if not maybe something from GitHub/Official Repositories/Homebrew).

    Can you recommend me some?

    Thank you in advance and have a great day!
     
  2. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #2
  3. velocityg4 macrumors 601

    velocityg4

    Joined:
    Dec 19, 2004
    Location:
    Georgia
    #3
    If you want a utility. Freefilesync does a great job syncing folders over a network. You can setup the job to sync multiple separate folders. It also includes RealTimeSync. Although I haven't tried that part. I just use the manual sync.

    https://freefilesync.org/download.php
     
  4. Mikael H macrumors 6502a

    Joined:
    Sep 3, 2014
    #4
    I can think of multiple solutions if you’re OK with a bit of command line work:
    - @Weaselboy’s tip on using rsync is a great start. Have the system run it periodically to keep the files synced.
    - You yourself mentioned git, which could do the same thing including keeping a canonical copy of the .rc file in a third place, as long as you remember to push changes when relevant.
    - If you have access to object storage (Nextcloud, Dropbox, an S3 or B2 storage), you can either create a symlink to the file in the synced directory (for services that keep one), or use the rclone utility in pretty much the same way you’d use rsync between two computers.

    If you don’t carry secrets in the .rc file, the two latter methods (potentially) allow for syncing wherever in the world you happen to be as long as you have a network connection. If you do carry secrets you could call gpg from within the sync script to encrypt the file before sending it out on the Internet, and to decrypt it before attempting to use it locally.
     

Share This Page

3 December 1, 2018