TFM https://linux.die.net/man/1/rsync
$rsync -av --progress /folder/to/backup/* /destination/of/backup/
To log results add the log flag
--log-file=/path/to/rlogfile
$rsync -av --progress --exclude="dir" /folder/to/backup/* /destination/of/backup/
$rsync -av --progress --exclude="dir" --exclude="dir2" --exclude="dir3" /folder/to/backup/* /destination/of/backup/
Note1: The --delete option
. If a file is deleted in the source it will be deleted in the backup as well.
Note2: The trailing slash on the source tells rsync to backup the contents of that directory. If you also want the directory itself to be backed up, remove the trailing slash.
$ rsync -avzhP --log-file=/path/to/rlogfile --delete --exclude='node_modules' --exclude='vendor' /path/to/source/ /path/to/backup