I have 2 database in afs disk that use by team A. 1 is using cvs and the other one is using rcs to control
the revision. I have to copy this two database into a central  afs disk space for team B usage. I will
use rsync to keep these two database in sync. Team B use and modified those files. For those modified
files, team B will stored in another disk space.

Is there any faster way that for me to check whether team A have any new release after I sync the team
B database? Because there have more than 100 files in each database. I need to alert team B when there
is new release in the database and make sure team B will update those modified files if neccessary.

It would be better if provide the code too.  :)

Who is Participating?
ahoffmannConnect With a Mentor Commented:
rsync -rzLR ...
depending on you cvs version, there is no reason to have a repository for team A (cvs), and for team B (rcs), 'cause cvs is/was just a more sophisticated frontend to rcs.
I'm not shure about newer cvs versions, if their repository still can be accessd by rcs. If so, you eithet need to tell one team to switch to the other software, or you need a human who checks out from cvs and commits to rcs and vice versa. It will be hard stuff to automate this (you know: cvs is designed for concurrent editing !!)
bhuey_lingAuthor Commented:
I think I didn't express my problems well.

My problem is:

1. team A have database 1 and database 2 for different files storage. database 1 is using rcs and database 2 is uisng cvs.

2. I have to copy this two database to team B's central database. Team B database always have to be in sync with team A database. I plan to use rysnc at here.

3. Now I need a efficient script that can help me check the database 1 and 2 wether there is any new release database 1 & 2 after sync with team A database 1 & 2. The database could have more than hundre files.


[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

ok, think I got it:
 before rsync starts to update team B's database, touch a file there (for example /B/stamp), then start rsync, then do following:
    find /B -newer /B/stamp

(assuming that the synced database is in /B, and that rsync modifies the timestamp of synced files).
bhuey_lingAuthor Commented:
T have another problem that I would like to use rysnc -R to preserve the full path but it seems not work for me:

A's database is in /main_A/dir_A/file_A

I would like rsync to B's database in /main_B/main_A/dir_A/file_A

If I using command:

rsync -R  /main_A/dir_A/file_A /main_B/

There is nothing copy to /main_B but if I go to /main_A and use command:

rsync -R  dir_A/file_A /main_B/

It works. But This is not useful for me since I need to go to each folder to ryncs each files. Is there any solution for this that I can srync without go to the directory.


could we please focus on your initial question.
Makes things simpler ;-)

Then we can solve the rsync problem later.
PLease post the commands (cd, rsync)  exactly as you used them.
bhuey_lingAuthor Commented:

There is a concern in your suggestion. By touch a file before rysnc, then those file in A's database will never newer then the current touched file.

i try to solved by using rysnc log data:
since rysnc print out the file that been updated, then i just the output to log file and then sent a mail for notification.

currently, I hv a problem that those file in the A'database, will include some other hardcoded path program. Currently i able to extract those hardcoded path program from the files but I cannot rsync directly.


file_1 in A's database /afs/teamA/file_1 call:

my working path would be /ds4/run
B's database /afs/teamB/

my rsync command din't work:   rsync -LRz  /disk1/module1/checklist /afs/teamB/

if i chdir to

cd /disk1

rsync -LRz module1/checklist /afs/teamB

then I can ge /afs/teamB/module1/checlist

I need to use -R to preserve those meaning path name.

Do you hv any idea for it?




cd /disk1/module1/checklist/afs/teamB/
rsync -azrv /disk1/module1/checklist/afs/teamA .

# is this what you mean
bhuey_lingAuthor Commented:
Sorry if for confusing description. Actually I means:

file_1 in A's database:

B's database /afs/teamB
my working path would be in any path other that /afs/teamA and /afs/teamB

my rsync command din't work as i expect:  
%rsync -LRz  /afs/teamA/module1/checklist /afs/teamB/

message : skip directory and no file is copy to /afs/teamB
I expect something like: /afs/teamB//afs/teamA/module1/checklist/file_1

But if i chdir to

%cd /afs/teamA

%rsync -LRz module1/checklist /afs/teamB

then I can ge /afs/teamB/module1/checlist/file_1

I need to use -R to preserve those meaning path name. but if not work for full path. It not make sense if I need to go to the the source directory to use rsync -R

Is there any workaround way?


bhuey_lingAuthor Commented:
thanks ..  it solve my problem  :)
so your qestion about cvs end up in a rsync problem ...
All Courses

From novice to tech pro — start learning today.