Solved

Comparing directories on different servers

Posted on 2006-10-22
4
315 Views
Last Modified: 2010-04-21
Hi, I just wanted to know if i use rsync to synchronize two directories on two different servers.. for example server1:/export/home and server2:/export/home, how can i do that.

thank you
vamsi
0
Comment
Question by:vamsi_uk
  • 2
  • 2
4 Comments
 
LVL 48

Expert Comment

by:Tintin
Comment Utility
Your subject says "compare", but your question says "synchronize".  Which is it?

To synchronize, do

rsync -a --delete /export/home/ server2:/export/home

to compare, do

rsync -na --delete /export/home/ server2:/export/home
0
 
LVL 4

Author Comment

by:vamsi_uk
Comment Utility
I have put rsync command to run everynight at 2AM and kill it at 8AM, and i wanted to check how much it has got synchronized between the two servers. So i thought i need to compare both the directories to see how much data got synchronized.
0
 
LVL 48

Accepted Solution

by:
Tintin earned 50 total points
Comment Utility
Add -v and --stats to get more details, eg:

rsync -av --stats --delete /export/home server2:/export/home
0
 
LVL 4

Author Comment

by:vamsi_uk
Comment Utility
thanks tintin
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now