Solved

Whats the quickest easiest way to syncronize two directories?

Posted on 2004-10-08
7
315 Views
Last Modified: 2010-04-21
It would be nice if the solution could handle open files, but not necessary. I want to sync files on a single server from directory A to directory B. I expect to run from cron every 3 hours or so, it is not a deep directory, but about 7 gig worth of data. Then I plan to backup to tape directory B.
0
Comment
Question by:dwanders
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 150 total points
ID: 12262706
rsync across an NFS mount would probably be the fastest. Whether it will complete in less than 3 hours for 7Gb of data will depend on the load on the prime & backup servers, network availability, and the amount of change. Since reads are faster than writes I'd run the rsync from the backup server.
0
 

Author Comment

by:dwanders
ID: 12262745
There are no NFS mounts involved, in fact networking is not a factor - this will be copying from /dir1  to   /dir2 on the same computer, same filesystem etc... I thought rsync was for remote sync? It would be nice if it could tell if a file had changed or not, should cut down on the ammount time needed to run.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 12262931
rsync doesn't care whether there's a remote involed or not. It just needs a master and slave specified.

I guess I don't see the point of sync'ing two directories on the same server and then backing up the slave. That doesn't help w/respect to open files and it would be more efficient to to simply run the backup against the master directory.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dwanders
ID: 12262933
Just read the man page, and I believe you have won the cigar. THis looks like it should work fine for my needs loaclly and I dont even need to spend much time on it so I am going to bump your points 25.

Thanks.
0
 

Author Comment

by:dwanders
ID: 12262954
We have users that work at different time, so I am hoping this is a cheap easy open file alternative. I will rsync every 6 hours or so to catch all three shifts, skipping the open when the are working and chacheing them the next shift. then a midnight, I will backup the copy folder. You think there may be a more effician way of doing it?
0
 
LVL 40

Expert Comment

by:jlevie
ID: 12264284
If you could arrainge things such that the mutable data for each shift was collected into a "shift dir" you could very efficiently and safely do the backups and completely avoid any open files.
0
 

Author Comment

by:dwanders
ID: 12275880
Whlie that might be possible, the logistics would be pretty annoying. Especially with folks moving around shifts all the time. I am sure that I could easily keep a list of certain users, their files, and which shift they work - then write a script to run the rsync based on my list of user when they were working etc ... but I believe I will let it run and see how well it works out with out all that mess. Then the users can move as they wish and I dont even need to knwo about it =).

Thanks again for your suggestion, I think it is work out very nicely - especially once the mirror is built it should run pretty quickly.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

734 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