Hallo Anantha

Rsync : backup your data

Posted on: August 18, 2007

rsync use for synchronizing file trees. like in the man pages, rsync can be used :

  1. for copying local files. This is invoked when neither source nor destination path contains a : separator
  2. for copying from the local machine to a remote machine using a remote shell program as the transport (such as rsh or ssh). This is invoked when the destination path contains a single : separator.
  3. for copying from a remote machine to the local machine using a remote shell program. This is invoked when the source contains a : separator.
  4. for copying from a remote rsync server to the local machine. This is invoked when the source path contains a :: separator or a rsync:// URL.
  5. for copying from the local machine to a remote rsync server. This is invoked when the destination path contains a :: separator.
  6. for listing files on a remote machine. This is done the same way as rsync transfers except that you leave off the local destination.

By now, i want to back up my data to another server.

so i use it. first, i install rsync

cd /usr/ports/net/rsync

make install clean

edit /usr/local/etc/rsyncd.conf

uid             = userid
gid             = groupid

use chroot      = no

max connections = 4

syslog facility = local5

pid file        = /var/run/rsyncd.pid
[www]        path    = /usr/local/www/

comment = all of the websites

then edit permission rsyncd.conf to 640

after that start the daemon

rsyncd --daemon

that’s all for the server.

in the client install the rsync, but don’t start the daemon.

after that get the module www that refer to /usr/local/www of first server. the example command shell:

rsync -avz --delete xxx.xxx.xxx.xxx::www /backup/data1

that’s mean, i get data /usr/local/www from first server and transfer they to /backup/data1 to second server and delete files or folders that didn’t match again if we do the same command.

we use rsync to get the update data regularly. then we put the script into the /etc/crontab. for example :

7 * * * * root /root/script/rsync.sh 2>&1 | mail -s "rsync script" root

where the rsync.sh was :

#!/bin/sh
/usr/local/bin/rsync -avz --delete xxx.xxx.xxx.xxx::www /backup/data1

-nanta-

3 Responses to "Rsync : backup your data"

What i do not understood is in truth how you’re not really much more neatly-preferred than you may be now. You are so intelligent. You realize thus significantly in the case of this subject, made me personally imagine it from numerous various angles. Its like women and men are not involved unless it is something to accomplish with Girl gaga! Your own stuffs nice. At all times maintain it up!

You’ve made some decent points there. I checked on the web to learn more about the issue and found most people will go along with your views on this website.

They’re ideal for folk who just wish to display a minimum content on the internet in little quantity of web space. Use your actual dba (Doing Business As) and physical address. While we evaluate a hosting business, it is necessary to identify their services with regard to their performance, reliability, service, scalability and security considerations.

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

Pages

August 2007
M T W T F S S
    Sep »
 12345
6789101112
13141516171819
20212223242526
2728293031  

My !Yahoo

BLUPAPER.com

Community

Amateur Radio Club ITB

Balikpapan blogger


KampungBlog.com - Kumpulan Blog-Blog
Indonesia
Personal blogs

Peta-Pengunjung

RSS ComputerWorld

  • An error has occurred; the feed is probably down. Try again later.

RSS NetworkWorld

  • An error has occurred; the feed is probably down. Try again later.

RSS InfoWorld

  • An error has occurred; the feed is probably down. Try again later.
%d bloggers like this: