Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Whats the quickest easiest way to syncronize two directories?

Posted on 2004-10-08
7
Medium Priority
?
318 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 600 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Loops Section Overview

886 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