Friday, January 9, 2009

Rsync, Copy Data Facility Multi Function and Easy configured

I am acquainted with any posts via rsync Ibam-pak Rahmat Samik-Ibrahim (rsync, features a giant-scale copy data). I use rsync to mirror the process of openSUSE repository, whether that is in the mirror and mirror http://download.opensuse-id.org existing local dikantor.

Some time ago I tried to make a fraudulent rsync server setup dikantor for copying data and the process was far easier than doing setup Samba, NFS, FTP and Web Server. I've tried rsync on openSUSE 11.0, openSUSE 10.3 and SUSE Linux Enterprise Server 10 without difficulty. I do not know whether others in the same simple distribution or not. It should do so as easily as rsync only 1 configuration file located in the main folder / etc.

If the setup samba take a long, rsync can be prepared in less than 5 minutes so that was very helpful if we want to make copying the data without having to perform a complex setup.

Setup rsync server on openSUSE:

1. Install the package via rsync YAST or via console. If the console, the process can be done with the install command: zypper in rsync
2. Change the configuration file / etc / rsyncd.conf
3. Sample configuration:


gid = users
read only = true
use chroot = true
transfer logging = true
log format =% h% o% f% b% l
log file = / var / log / rsyncd.log
pid file = / var / run / rsyncd.pid
# hosts allow = trusted.hosts
slp refresh = 300

[Home-Vavai]
path = / home / vavai
comment = Data-vavai
# Auth users = user
# Secrets file = / etc / rsyncd.secrets

[iso]
path = / srv / www / htdocs
comment = iso file vavai

That need to be changed is the hosts allow = # trusted.hosts (replaced by a computer's IP client can access) and in part that begins with square brackets []. This section is the section that will be shared. In the example above, I do share the folder 2, which is / home / vavai and / srv / www / htdocs. Please adjust the share folder of your choice.
4. We can also create text files / etc / rsyncd.motd any posts containing a welcome (Message of the Day) and add the option motd file = / etc / rsyncd.motd on the file / etc / rsyncd.conf above
5. Restart the service with the rsync command: service rsyncd restart
6. Test the console with the command: rsync-IP-Address Server::, for example rsync 192.168.0.1::
Note: The IP can be replaced with the hostname, such as rsync vavai.vavai.com::
7. To perform a download folder, we can use the option-av. The following example is done on

Client Settings

1. Install the package via rsync YAST or via console. If the console, the process can be done with the install command: zypper in rsync
2. Check rsync server on the console with the command: rsync-ip-address server: for example rsync 192.168.0.1::
3. We can also go to a specific folder, for example, rsync 192.168.0.1:: Home-Vavai /. Do not forget to add the icon / folder at the end of which want to see the contents of the folder.
4. To copy data, use the following command: rsync-av ip-address-server:: name-folder-share-folder-name destination /, for example: rsync-av 192.168.0.1:: Home-Vavai / / srv / www / htdocs / backup. That means we will copy the contents of rsync share with the name of Home-Vavai to the folder / srv / www / htdocs / backup.
5. We can also ensure that the destination folder, and always have a version of the same data with the option with rsync-av - delete
6. We also can exclude a file / folder from the process with the option - exclude.
7. Please referring to the manual rsync for other options that are more complete.

No comments:

Post a Comment