Linux Troubleshooting Make Easy.

Linux Learning & Troubleshooting Make Easy.

Rsync configuration

Rsync is a program, which is used for taking the backups on regular basis. It can also be configured to upload large portals and any other data on the remote servers. It is based on remote-update protocols, which means that it only sees the differences between the source and destination files and if the files has been changed, takes the backup otherwise leaves it without taking any backup.



Instll the rsync Package:
#  yum install rsync


We can edit two files if you want rsyncd daemon to run when system boots.
Append the following text in /etc/services file, if not already there:

     rsync 873/tcp         

Make an entry in /etc/inetd.conf by putting the line

     rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon         

Replace the "/usr/bin/rsync" with the path where you have installed the rsync.


There are three configuration files to run rsync server.

        /etc/rsyncd.conf
       /etc/rsyncd.pid
       /etc/rsyncd.secrets

Edit /etc/rsyncd.conf configuration file:
#  vi /etc/rsyncd.conf


     #### rsyncd.conf file ####

      uid = username
      gid = usergid
      pid file = /etc/rsyncd.pid
      syslog facility = daemon
     [modulename]  #Module name could be any name
      path = /path/to/yourdata
     comment = user related any info
     auth users = anonymous username
     hosts allow = x.x.x.x
     secrets file =/etc/rsyncd.secrets
     max connection = 2
     use chroot = true
     timeout = 60

    #### End of configuration file ####

Edit /etc/rsyncd.pid file:
#  vi /etc/rsyncd.pid

The file /etc/rsyncd.secrets can be like this containing the username and password with a colon in between on the client side.

      username : yourpassword        

rsync options:

-v, --verbose increase verbosity
-q, --quiet decrease verbosity
-c, --checksum always checksum
-a, --archive archive mode
-r, --recursive recurse into directories
-R, --relative use relative path names
-u, --update update only
-W, --whole-file copy whole files, no incremental checks
-I, --ignore-times Normally rsync will skip any files that are already the same length and have the same time-stamp
-c, --checksum always checksum-z, --compress compress file data


Example:

Copy file from /www/backup1.tar.gz to a remote server called example.com


#  rsync -v -e ssh /www/backup1.tar.gz alex@example.com:/home/alex

Copy file /home/alex/note.png from a remote server example.com to a local computer /vat/tmp directory:

#  rsync -v -e ssh alex@example.com:~/note.png /vat/tmp




5 comments:

Guo Guo said...

guowenhao20150313
oakley sunglasses
oakley sunglasses
hollister pas cher
true religion jeans
ray ban sunglasses
mont blanc
coach outlet
louis vuitton outlet
louis vuitton outlet
michael kors outlet online
cheap snapbacks
burberry handbags
kate spade handbags
burberry outlet
coach factory outlet
gucci outlet
herve leger dresses
ferragamo shoes
marc jacobs
coach outlet store online
oakley sunglasses
adidas shoes
kobe 9
timberland boots
herve leger
cheap nfl jerseys
cheap oakley sunglasses
converse shoes
mcm bags
tods outlet
pandora jewelry 
cheap nba jerseys
coach outlet store
louis vuitton handbags
coach outlet
instyler ionic styler
air jordan shoes
babyliss

ninest123 Ninest said...

ninest123 11.26
michael kors handbags, burberry factory outlet, longchamp bags, replica watches, louboutin uk, michael kors outlet, uggs outlet, prada handbags, louis vuitton outlet online, cheap oakley sunglasses, ralph lauren outlet, louis vuitton outlet, cheap jordans, louboutin shoes, louis vuitton, gucci handbags, ralph lauren polo, oakley sunglasses, oakley sunglasses, oakley sunglasses, longchamp outlet, ray ban sunglasses, longchamp outlet, nike outlet, ray ban sunglasses, christian louboutin, uggs outlet, prada outlet, nike free, michael kors outlet online, nike air max, ray ban sunglasses, uggs on sale, christian louboutin, nike air max, replica watches, michael kors outlet online, burberry outlet, uggs on sale, tiffany jewelry, louis vuitton handbags, oakley sunglasses, tiffany jewelry, uggs on sale, tory burch outlet, michael kors, louis vuitton outlet, michael kors outlet online

ninest123 Ninest said...

longchamp pas cher, timberland pas cher, polo ralph lauren uk, nike trainers uk, true religion outlet, hermes pas cher, nike roshe run pas cher, nike tn pas cher, michael kors, nike air max pas cher, michael kors uk, abercrombie and fitch UK, north face uk, north face pas cher, mulberry uk, vanessa bruno pas cher, michael kors, lunette ray ban pas cher, sac guess pas cher, longchamp soldes, nike air max uk, coach purses, louboutin pas cher, coach outlet store online, abercrombie and fitch, ralph lauren pas cher, true religion outlet, vans pas cher, hollister uk, nike free pas cher, true religion outlet, nike free, nike air max uk, ray ban uk, jordan pas cher, polo lacoste pas cher, nike blazer pas cher, hogan sito ufficiale, true religion jeans, lunette oakley pas cher, lululemon outlet, nike roshe uk, nike air max, new balance, converse, burberry pas cher, coach outlet, michael kors outlet online, nike air force

ninest123 Ninest said...

iphone 6s cases, mac cosmetics, north face outlet, oakley, vans scarpe, nike air max, hermes handbags, softball bats, ipad cases, s6 cases, louboutin, nike roshe run, gucci, vans outlet, abercrombie and fitch, celine handbags, mont blanc, valentino shoes, iphone 5s cases, ray ban, giuseppe zanotti, lululemon outlet, beats by dre, nfl jerseys, mcm handbags, bottega veneta, nike air max, iphone 6 cases, chi flat iron, insanity workout, iphone cases, converse, asics running shoes, instyler ionic styler, reebok outlet, babyliss pro, hollister clothing, north face outlet, polo ralph lauren, soccer shoes, wedding dresses, salvatore ferragamo, iphone 6 plus cases, new balance shoes, herve leger, iphone 6s plus cases, p90x workout, ghd hair, hollister, timberland boots, jimmy choo outlet, soccer jerseys

ninest123 Ninest said...

louis vuitton, pandora jewelry, moncler, pandora uk, canada goose, canada goose pas cher, barbour jackets uk, moncler, canada goose outlet, hollister, louis vuitton, moncler jackets, replica watches, toms shoes, uggs outlet, moncler, canada goose outlet, ugg pas cher, canada goose uk, lancel, ugg uk, juicy couture outlet, bottes ugg pas cher, converse shoes outlet, thomas sabo uk, karen millen uk, wedding dresses uk, sac louis vuitton, pandora charms, supra shoes, pandora jewelry, barbour, moncler pas cher, coach outlet, moncler outlet, marc jacobs, louis vuitton uk, ugg,uggs,uggs canada, swarovski jewelry, canada goose jackets, canada goose, sac louis vuitton, doke & gabbana, moncler, ugg,ugg australia,ugg italia, montre pas cher, canada goose jackets, swarovski uk, juicy couture outlet, links of london uk, moncler uk
ninest123 11.26