Home arrow Site Administration arrow Page 6 - File Synchronization With Rsync

Doing More - Administration

Save time (and money) on data transfers between hosts withrsync, a synchronization tool that allows easy, efficient replication offiles between different locations. Sync up, now!

TABLE OF CONTENTS:
  1. File Synchronization With Rsync
  2. Getting The Skinny
  3. Building Blocks
  4. Temporary Insanity
  5. Remote Control
  6. Doing More
  7. What's In A Name?
  8. Mirror, Mirror, On The Wall
  9. Link Out
By: icarus, (c) Melonfire
Rating: starstarstarstarstar / 93
December 04, 2002

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
It's possible to obtain a list of all the modules available on the rsync server by omitting the module name from the command line when connecting to the server. Here's an example, and the output:
[me@xanadu] $ rsync olympus::
home            My Home Area
Now, if I were to add a few more modules to the configuration file,
[temp]
 path = /tmp comment = Temp Arealist = yes
restart the rsync server on "olympus",
[me@olympus] $ killall rsync
[me@olympus] $ rsync --daemon
and attempt to reconnect to it from "xanadu", I'd have access to the new modules as well.
[me@xanadu] $ rsync olympus::
home My Home Areatemp            Temp Area
You can exclude modules from being listed in this manner by specifying a
list = no
option within the module configuration.

It's also possible to tell rsync to exclude certain files from the synchronization process, with the "--exclude" command-line option. Here's an example, which copies all the files *except* those with a ".tmp" extension from "xanadu" to "olympus":
[me@xanadu] $ rsync --verbose --progress --stats --recursive
--exclude="*.tmp" olympus::home/ .
Finally, rsync's default behaviour when encountering symbolic links is to omit them - as in the following example:
[me@xanadu] $ rsync --progress  --recursive  olympus::home/ .          
skipping non-regular file "public_html/config.lib.php3" skippingnon-regular file "public_html/start.php"
As you can see, when I attempt to copy the "/home/me/public_html" directory to "xanadu", every symbolic link within that directory is skipped. You can have rsync retain these links as is during the copy process by specifying the "--links" option on the command line,
[me@xanadu] $ rsync --progress  --recursive  --links olympus::home/ .
or replace the symbolic links by the actual files being referenced with the "--copy-links" option.
[me@xanadu] $ rsync --progress  --recursive  --copy-links olympus::home/
.


 
 
>>> More Site Administration Articles          >>> More By icarus, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

SITE ADMINISTRATION ARTICLES

- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: