# RSync

RSync is a [FOSS](https://wiki.jamesravey.me/books/seed-propagator/chapter/free-open-source-software-and-open-culture "Free Open Source Software and Open Culture") file copying/syncing tool that has a number of uses and can be used to sync via SSH.

### Preserving User Permission in Rync

[https://brainsteam.co.uk/2024/01/03/migrating-users-across-servers-with-rsync/](https://brainsteam.co.uk/2024/01/03/migrating-users-across-servers-with-rsync/)

### Syncing with Non-Standard SSH Ports

It's generally good practice to run SSH services on non-standard ports so that they can't be (as) easily port-scanned and attacked. If you need to use RSync with a non standard port you can tell it any extra ssh arguments it needs to know about via the `-e` argument as explained in [this article](https://www.tecmint.com/sync-files-using-rsync-with-non-standard-ssh-port/) ([mirror](https://archive.jamesravey.me/archive/1690032132.955091/index.html)):

```bash
rsync -arvz \
  -e 'ssh -p <port-number>' \
  --progress --delete \
  user@remote-server:/path/to/remote/folder /path/to/local/folder

```