LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 07-15-2009, 09:39 PM   #1
elainelaw
Member
 
Registered: Jan 2008
Posts: 258

Rep: Reputation: 30
Compare files in two different servers


I have two servers , each server have a path to keep many files , these files in the path should be the same ( file name , file size , no of file , date of file ) , everything should be the same , there are some files will be write to these path from time to time , if I would like to compare these path to make sure the file is consistency anytime , can advise what can i do ? thx
 
Old 07-16-2009, 01:48 AM   #2
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
1) you could use fuse to mount one file system remotely and run diff on the files. If there is a difference, an alert could be sent to tell you something is out of sync.
2) you could use a cron'd rsync to force syncronicity. In effect, this would push the files on the source server to the target server if the target gets out of sync.
3) Use something like "File Alteration Monitor" or iNotify, specifically iNotifyWatch to check for file system changes and then do something (like rsync). This would allow you to push in either direction, rather than from a designated "master".
 
Old 07-16-2009, 07:35 AM   #3
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 520

Rep: Reputation: 37
Quote:
Originally Posted by elainelaw View Post
I have two servers , each server have a path to keep many files , these files in the path should be the same ( file name , file size , no of file , date of file ) , everything should be the same
Maybe you can share the directory between the servers? Have you considered setting up a NFS server on one of the servers, export the files and mount the share on the other server?

This way your servers would be in sync all the time

R.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare directory trees on seperate servers ? dhg1848 Linux - Server 4 11-26-2008 08:47 AM
compare two files tekmann33 Linux - Newbie 2 10-28-2008 08:09 AM
compare two files haydar68 Programming 8 08-16-2008 03:36 PM
Compare files in specific directory to files on CD szim90 Linux - Newbie 3 02-10-2007 08:39 PM
How do I compare 2 files? linuxhippy Slackware 6 03-26-2005 01:54 AM


All times are GMT -5. The time now is 12:36 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration