실습> rsync 디렉터리 추가하기
1. 설정 파일 수정
[root@web2 ~]# vi /etc/rsyncd.conf
[EVER_LOG]
path = /var/log
comment = logBackup
uid = root
gid = root
use chroot = yes
read only = yes
max connections = 1
pid file = /var/run/rsyncd.pid
transfer logging = yes
timeout = 600
hosts allow = 192.168.101.101
#ignore nonreadable = yes
#dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2
[EVER_ETC]
path = /etc
comment = /etc Backup
uid = root
gid = root
use chroot = yes
read only = yes
max connections = 1
hosts allow = 192.168.101.101
[HOME]
path = /home
comment = /home Directory
uid = root
gid = root
use chroot = yes
read only = yes
max connections = 1
hosts allow = 192.168.101.101
2. 확인
[root@web1 ~]# rsync -avz 192.168.101.100::
EVER_LOG logBackup
EVER_ETC /etc Backup
HOME /home Directory
3. 백업
/etc 디렉터리를 백업한다.
[root@web1 ~]# rsync -avz 192.168.101.100::EVER_ETC /backup/etc
[root@web1 ~]# ls /backup/etc/
DIR_COLORS cron.monthly
:
:(생략)
/home 디렉터리를 백업한다.
[root@web2 ~]# useradd user1
[root@web2 ~]# useradd user2
[root@web2 ~]# ls /home
user1 user2
[root@web1 ~]# rsync -avz 192.168.101.100::HOME /backup/home
[root@web1 ~]# ls /backup/home
user1 user2
'Linux > 보안장비 운용' 카테고리의 다른 글
| rsync 데몬 중지 (0) | 2022.03.03 |
|---|---|
| rsync + 날짜별로 백업하기 (0) | 2022.03.03 |
| rsync server/client 구성하기 (0) | 2022.03.03 |
| 백업 (1) | 2022.03.03 |
| pfsense 방화벽 설치하기 (1) | 2022.03.03 |