Skip to content

Instantly share code, notes, and snippets.

@micahyoung
Created August 1, 2020 17:03
Show Gist options
  • Save micahyoung/deaf3e5a80f850f98aa3ffef1dfcdd45 to your computer and use it in GitHub Desktop.
Save micahyoung/deaf3e5a80f850f98aa3ffef1dfcdd45 to your computer and use it in GitHub Desktop.
Rsync-equivalent for Windows using minio

Requirements

  • MacOS/Linux/Windows workstation
  • Windows machine where source needs to be executed/built/etc
  • Trusted network access between both (VPN or LAN only)

On Windows Machine

  • Download minio executable
    choco install minio-server
    
  • Start a persistent minio process to share a parent directory that will contain your read-only, mirror destination
    $env:MINIO_ACCESS_KEY="AKIAIOSFODNN8EXAMPLE"
    $env:MINIO_SECRET_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCZEXAMPLEKEY"
    
    minio server c:\Users\myuser\workspace

On Workstation

  • Download mc minio client

    # MacOS
    brew install minio-mc
    
    # Windows
    choco install minio-client
    
  • Add Windows machine as a host for minio

    mc config add host devbox "AKIAIOSFODNN8EXAMPLE" "wJalrXUtnFEMI/K7MDENG/bPxRfiCZEXAMPLEKEY"
    
    # test connection
    mc ls devbox
    
    # Output: (may be empty for new directories)
    [2020-08-01 12:14:38 EDT]      0B foo/
    [2020-08-01 12:14:38 EDT]      0B bar/
    
  • Start a persistent mc process to constantly mirror your workstation source directory to your Windows machine

    mc mirror --watch --overwrite --remove --exclude '.git/*' --exclude '.idea/*' ~/workspace/my-project devbox/my-project
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment