Using RSYNC to backup (synchronize) folders

rsync
If you want to synchronize two folders use next snippets.

1. Sync folder “source” content to “target” folder:

rsync -arpv --delete /mnt/source/ /mnt/target

Notice trailing slash for “source” folder!

2. Sync whole folder “source” to “parent” folder:

rsync -arpv --delete /mnt/source /mnt/parent

More info https://linux.die.net/man/1/rsync