As part of the new ECO Migration process, we will migrate the Production database Agile ECOs to a target test database. Part of this new process will involve copying files from the Production server (mesa) to a target database server - in this case UAT2 (extapuata). We are hoping you can write a Unix script to take care of the file copying. This Unix script should exist on the Production Server and will be scheduled to run once a day. The specifics of the script are below:
The source directory for the files will be on mesa in /n01/applprod/PROD11i/appl/ilink/11.5.0/processed.
The target directory for the files will be on extapuata in /n01/uat2/prod11iappl/ilink/11.5.0/incoming.
The files you would need to copy will all begin with a 'TO' and have a extension of 'AXML'. For example TO00001.AXML.
The number of files in the source directory will keep growing. You don't need to copy them all. You will have to use the following logic to determine if a file needs to be copied or not:
If the specific file in the source directory, say TO00001.AXML, exists on the target server in the /n01/uat2/prod11iappl/ilink/11.5.0/processed directory, then you don't need to copy that file - it has already been processed.
If it doesn't exist in that directory, then you need to check if the file exists on the target server in the /n01/uat2/prod11iappl/ilink/11.5.0/incoming directory. If it does exist there, then you don't want to copy that file - it is already there waiting to be processed.
If it doesn't exist in /n01/uat2/prod11iappl/ilink/11.5.0/incoming , then you need to copy that file to that directory.
You will need to make sure the files which are copied have the correct permissions and ownership/grouping so that Agile can process them. Currently on mesa the files are put in the /n01/applprod/PROD11i/appl/ilink/11.5.0/incoming directory as agile:oaa. When Agile processes the files, it moves them to the /n01/applprod/PROD11i/appl/ilink/11.5.0/processed directory as applprod:oaa. When you are copying the files from the mesa /n01/applprod/PROD11i/appl/ilink/11.5.0/processed directory and putting them in extapuata /n01/uat2/prod11iappl/ilink/11.5.0/incoming, you will have to change their ownership/grouping from applprod:oaa to agile:oaa.
When you are writing this script, keep in mind that these files may need to be moved to more than one target database server. Initially we are only migrating the ECO files from Production to UAT2. In the near future we may be migrating them from Production to SIT2 or TST or some other database also. So make your script generic enough that it can be used for multiple target databases or easy enough to modify if a different version of the script is needed for each target database. In your script, the source database will ALWAYS be Production (mesa). Just the target database may change.