The exact scenario. One NFS is the master in one datacentre. Then there are at least 4 other data centres, with up to 10 labels each (snapshots of the code at points in time), sync'd from a DB.
When building the DB copy it looks at a stage area. but the master copy is in one city and the closest NFS mount is on one of the other 4. So when building the stage area makes sense to copy as much from the local datacentre as possible, then copy the missing from the master copy.
Problem is we don't know at the time of the script which data centre is the local one, and which of the 10 labels contains the most up to-date file. Hence the hunt. The resent problem is were running out of space on the stage area so the rsync currently in place is falling over.
So the idea is to symlink them to the NFS mount with the latest file... which will be the local datacentre, latest label, and any missing end up pulling from the master.
I'm going to do this by script at the moment but wanted to see if there was any way to get rsync (or other product) to sync as symbolic links to the original location rather than copy.
|