GNU/Linux Desktop Survival Guide
by Graham Williams |
|||||
Synchronise Folders |
20200124 To synchronise a local folder to a remote backup of that folder use the rsync command.
$ rsync -avzh local/ rhost:BACKUP/local/ |
To ignore any file/folder named cache:
$ rsync -avzh --exclude 'cache' local/ rhost:BACKUP/local/ |
To remove any remote files that are not in the current source folder
use --delete
:
$ rsync -avzh --delete local/ rhost:BACKUP/local/ |