Beranda > Linux, System Administrator > Konfigurasi rsync untuk backup file ke server lain

Konfigurasi rsync untuk backup file ke server lain

rsync

Rsync akan dilakukan pada source server dan destination di server backup

contoh yang akan dilakukan sync dari /var/www/html di Host kowalski server[172.16.0.4] ke dalam /home/backup server backup [172.16.0.61].

[1]Konfigurasi di server backup

[verrysoon@backup]# yum -y install rsync xinetd

[verrysoon@backup]# vi /etc/xinetd.d/rsync

# default: off

# description: The rsync server is a good addition to an ftp server, as it \

# allows crc checksumming etc.

service rsync

{

disable= no# change

flags= IPv6

socket_type= stream

wait= no

user= root

server= /usr/bin/rsync

server_args= –daemon

log_on_failure+= USERID

}

[verrysoon@backup]# /etc/rc.d/init.d/xinetd start

Starting xinetd:[ OK ]

[verrysoon@backup]# chkconfig xinetd on

[verrysoon@backup]# mkdir /home/backup

[verrysoon@backup]# vi /etc/rsyncd.conf

# any name you like

[site]

# destination directory

path = /home/backup

# Hosts you allow to copy (specify source Host)

hosts allow = 172.16.0.4

hosts deny = *

list = true

uid = root

gid = root

read only = false

[2]Konfigurasi di server utama kowalski

[verrysoon@kowalski]# yum -y install rsync

[verrysoon@kowalski]# vi /etc/rsync_exclude.lst

# specify files or directories you’d like to exclude to copy

test

test.txt

[3] Test di server utama seperti berikut :

[verrysoon@kowalski]# rsync -avz –delete –exclude-from=/etc/rsync_exclude.lst /var/www/html/ 172.16.0.61::site

# Jika berhasil pasang di crontab

[verrysoon@kowalski]# crontab -e

# run at 2:00 AM in a day

00 02 * * * rsync -avz –delete –exclude-from=/etc/rsync_exclude.lst /var/www/html/ 172.16.0.61::site

Best Regards,

Verrysoon

http://forum.tar-xzvf.web.id

  1. April 17, 2013 pukul 10:35 am

    I’m really loving the theme/design of your blog. Do you ever run into any browser compatibility problems? A handful of my blog visitors have complained about my site not operating correctly in Explorer but looks great in Chrome. Do you have any ideas to help fix this issue?

  2. Mei 31, 2013 pukul 2:20 pm

    I hope this information has given you some useful info on roofs.
    Not only does a digger are aware that it’s very possible he or she find a good deal of gold with very little trouble, but, worse still, he knows he could work very difficult without getting any gold at all. As the atmosphere begun to disintegrate around me, I felt a new strength forge into my thoughts.

  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s