Post

rsync note

rsync server (debian)

$ apt-get install rsync

$ vi /etc/rsyncd.conf

[vanix_mac]

path = /home/vanix/rsync/ uid = vanix gid = vanix auth users = vanix_mac secrets file = /etc/rsyncd.secrets

其他預設設定不動

$ vi /etc/rc.local

/usr/bin/rsync –daemon

$ vi /etc/rsyncd.secrets

auth_user:password

$ chown root.root rsyncd.secrets

$ chmod 600 rsyncd.secrets

rsync client

$ rsync -rvlHpogDts ~/ vanix_mac@ip:vanix_mac update: $ rsync -rvlHpogDtS ~/ vanix_mac@ip::vanix_mac

解釋–> rsync 參數 source_directory auth_user@ip:module_name

取回rsync的檔案

$ rsync -azv vanix_mac@ip::vanix_mac/ ~/

解釋–> rsync -azv <帳號>@<主機名稱>::<模組名稱>/<檔案或是目錄名稱> <目的位置>

This post is licensed under CC BY 4.0 by the author.

© homedad. Some rights reserved.

Using the Chirpy theme for Jekyll.