Sending data from linux to linux via rsync

2021.11.08  |  35

Examples of transferring data between two servers on linux using the rsync program

Sending a single file:
rsync -e ssh --progress -lzuogthvr --compress-level=9 /home/file.tgz root@remote-server.ru:/home/file.tgz
Sending a folder with an exception by mask:
rsync -e ssh --progress -lzuogthvr --compress-level=9 
/home/test root@remote-server.ru:/home/test --exclude '/home/test/exclude-folder-name'