Solved

Whats the quickest easiest way to syncronize two directories?

Posted on 2004-10-08
7
309 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
  • 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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 demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 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

20 Experts available now in Live!

Get 1:1 Help Now