Servers and cloud

Sync a folder to a server (rsync)

Copy a folder to a server and keep it up to date, sending only what changed.

Fill these in once
  1. Preview what would be copied
    Terminal
    rsync -avzn my-site/ ubuntu@203.0.113.10:~/my-site/

    The n means dry run: nothing is copied yet.

  2. Copy it for real
    Terminal
    rsync -avz --progress my-site/ ubuntu@203.0.113.10:~/my-site/

    Run it again later and only the changed files are sent.

  1. Preview what would be copied
    Terminal · Ubuntu / Debian
    rsync -avzn my-site/ ubuntu@203.0.113.10:~/my-site/

    The n means dry run: nothing is copied yet.

  2. Copy it for real
    Terminal · Ubuntu / Debian
    rsync -avz --progress my-site/ ubuntu@203.0.113.10:~/my-site/

    Run it again later and only the changed files are sent.

rsync isn't built into Windows. Use scp (Copy files to and from a server), or run these commands in WSL.