Recent Posts
Recent Comments
변군이글루
[명령어] rsync 명령어 본문
rsync 명령어
rsync [OPTION] ssh [USER@]HOST:SRC/ DEST
1.1.1.1 서버에 있는 /app를 동기화할때 exclude 디렉토리를 제외하고 2.2.2.2 /app2에 동기화
###1.1.1.1 /app -> 2.2.2.2 /app2
root@2.2.2.2:~$ rsync -avzp --exclude exclude_dir1 --exclude exclude_dir2 -e ssh root@1.1.1.1:/app/ /app2
rsync [OPTION] ssh SRC/ [USER@]HOST:DEST
2.2.2.2 서버에 있는 /app2를 동기화할때 exclude 디렉토리를 제외하고 1.1.1.1 /app에 동기화
###2.2.2.2 /app2 -> 1.1.1.1 /app
root@2.2.2.2:~$ rsync -avzpu --exclude exclude_dir1 --exclude exclude_dir2 --exclude lost+found /app2/ root@1.1.1.1:/app
Usage: rsync [OPTION]... SRC [SRC]... DEST
Options | |
-v, --verbose | increase verbosity |
-a, --archive | archive mode; equals -rlptgoD (no -H,-A,-X) |
-r, --recursive | recurse into directories |
-b, --backup | make backups (see --suffix & --backup-dir) |
-u, --update | skip files that are newer on the receiver |
--delete | delete extraneous files from destination dirs |
-z, --compress | compress file data during the transfer |
-p, --perms | preserve permissions |
--exclude=PATTERN | exclude files matching PATTERN |
'* 리눅스' 카테고리의 다른 글
[리눅스] goaccess 설치 및 설정 (0) | 2020.11.17 |
---|---|
[리눅스] chrony 설치 및 설정(ntpd 대체) (0) | 2020.11.16 |
[명령어] rsync 명령어 (0) | 2020.11.16 |
[명령어] screen 명령어 (0) | 2020.11.13 |
[kubernetes] kubeadm 구성 보기 (0) | 2020.11.11 |
[kubernetes] 실행 중인 컨테이너에 대화형 셀로 접근 (0) | 2020.11.11 |
0 Comments