Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Whats the quickest easiest way to syncronize two directories?

Posted on 2004-10-08
7
Medium Priority
?
317 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 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
RHCE - Red Hat OpenStack Prep Course

This course will provide in-depth training so that students who currently hold the EX200 & EX210 certifications can sit for the EX310 exam. Students will learn how to deploy & manage a full Red Hat environment with Ceph block storage, & integrate Ceph into other OpenStack service

 

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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

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…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

721 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