Copy from local to remote using rsync

I found copying large files from GoPro which was imported on my Mac unreliable when using Finder to copy it to my NAS. In order to avoid this issue I now use rsync to copy my imported Photos library from mac to NAS.

The following command will disply progress, exclude the Photos Library.photoslibrary folder and remove the source file when the transfer is complete.

rsync -rvz --exclude 'sync' --exclude '*.photoslibrary' --remove-source-files -e 'ssh -p 2222' --progress ./* username@server:/home/username/GoPro