RSYNC

1 – Instale o pacte rsync

apt-get install rsync

2 – Configure o arquivo /etc/rsyncd.conf assim:

uid = root
gid = root
use chroot = yes
pid file = /var/run/rsyncd.pid
ignore nonreadable = yes
log file = /var/log/rsyncd.log
log format = %o %h [%a] %m (%u) %f %l %b %c
transfer logging = true
read only = false
lock file = /var/lock/rsyncd
max connections = 100
hosts allow = 192.168.0.2

[mail]
        uid = root
        gid = root
        path = /mnt/raid/mail

IMPORTÂNTE: Só será possí­vel sincronizar dados de areas “[mail]” definidas neste arquivo de configuração.

3 – Habilite o rsync para rodar como daemon

vi /etc/default/rsync
RSYNC_ENABLE=true

4 – Reinicie o rsync

/etc/init.d/rsync restart

DICA: Veja no arquivo rsyncd.log se o servidor levantou.

TESTANDO

Faça o login na maquina cliente e instale o pacote rsync

apt-get install rsync

Entre com o seguinte comando para testar o rsync

rsync -av --delete --progress 192.168.0.1::mail /backup
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s