copyDomain utility

A business person calls you to saying he is desperate: “There is an error in the tool! I need to send some information to my manager now! Can you solve this now!” Who has not been in a situation that!?

Always when we’re working with any tool, we always need to prepare to some environments like training or, in the case above, to validate any errors that are occurring in production environment, this isn’t different in the RPAS.

The best practices tell us that when we find an error is recommended copy the domain to non-production environment; this environment we can validate the error and also test and validate any correction possible.

Normally this practice occurs for several reasons and constraints, but mainly to prevent further errors in production. So today we will explain a utility which helps a lot project and support team in our day-to-day activities

copyDomain utility

Today we present a utility of the RPAS, copyDomain. This utility is responsible for making a copy from one environment in a way that ensures all relationships that exist within the domain, such as arrays and hierarchies.

The main objective of copyDomain is copy a domain from Source A to Destination B, independent the format of domain: simple domain or global domain. You can see below an example of copyDomain:

pathToSrc=<directory where domain is>
pathToDestDomain=<directory where domain need to copy>

copyDomain -d $pathToSrc -dest $pathToDestDomain

Optimizing copyDomain

Copy the entire environment to validate a situation, sometimes is not necessary. For example, when we find a specific bug in a part of domain, we don’t need all items or stores to validate the bug.

Other situation, if we have a powerful machine would be good to use all resources to do the copy in parallel.

Thinking about it, there are other arguments that assist in the implementation of copyDomain; So we’ll explain some that can be used with the above example:

-maxProcesses COUNT

This argument aims to use more than one process to run copyDomain.

By default, copyDomain makes copying files sequentially. With this argument, it will run in parallel at most COUNT processes

-copyWorkbooks workbookList|none

This argument aims to define each user workbooks will be copied by copyDomain.

By default, copyDomain makes a copy of all users workbooks to destination. With this argument, it’ll copy only the workbooks that are specified;

In case of “none”, none user workbook will be copied to the destination; this option is much interest to reduce the size of destination domain

-skipInput | -skipEmptyDir

These arguments aims to reduce the volume of data to be copied by copyDomain.

skipInput: As the input folder contains all the files need to be loaded or were loaded; skip this folder, copy avoids unnecessary files.

skipEmptyDir: this option won’t create in destination any folder that is empty in the source domain.

WARNING: If there is an environment cleanup correct policy, this option can remove folders that are important to the operation by RPAS.


This argument is aimed not copy any Local Domain from Source Domain.

This argument only makes sense for a Global Domain solution and when the need is only applicable to Global Domain issues.


This argument aims to force the copy to final destination. If the destination already exists, copyDomain will remove the data and then proceed with the domain copy

This argument is interesting for those who have a support standard and a automatically process to build an environment for validation.

-clone dimposlist

This argument aims to copy only given position to the destination.

For dimposlits we have set as dim1,pos1,..,posn:dim2,pos1,..,posn

Multiple dimensions may be specified, but only one dimension per each hierarchy is allowed

This argument is interesting because it dramatically reduces the end domain size; and thus it’s possible to maintain multiple domains in a support environment


This argument aims to compress the domain after copying by copyDomain. Depending the final domain size, this may take to finished.

This argument is recommend when you need to send a domain to Oracle to meet a Service Request (SR).

Updating Paths

Sometimes We need to do a recovery of production environment or build a different environment like training. Normally we have a compressed backup and then after decompressing in a directory, it’s necessary to set the paths of all domains.

This operation is necessary because the paths of domains within a solution often has server physical addresses and when we decompressed these paths may be wrong.

pathToSrc=<directory where domain is>
copyDomain -d $pathToSrc -relativizePaths

Other operations with copyDomain

There are other operations with the copyDomain, some are rarely used, but it’s important to always check the copyDomain the HELP for details or new features.

copyDomain -help|usage

I’m glad to help you with this information and facilitate its activities with the RPAS. Let me know if you have any questions or doubts.

Leave a Reply

Your email address will not be published. Required fields are marked *