AppToCloud Command Reference

Only Oracle Cloud at Customer This topic applies only to Oracle Cloud at Customer.

Oracle provides a collection of graphical and command line tools to automate the process of exporting your on-premises Oracle WebLogic Server environments, so that you can import them to Oracle Java Cloud Service .

Each command line tool is available for both Unix (.sh) and Windows (.cmd) platforms.

Prior to using any of the AppToCloud tools, set the JAVA_HOME environment variable to the directory where you have installed the Java SE Development Kit (JDK).

Do not run the AppToCloud tools using an older JDK version than the version being used to run your WebLogic Server domain. In addition, if your domain is running JDK 6, you must use a separate JDK 7 installation to run the AppToCloud tools.

Depending on the options you specify, the AppToCloud tools may prompt you for various credentials (user names and passwords). When prompted, you can either enter the values for these credentials interactively or pipe them into the standard input stream. For example: echo "password" | a2c-healthcheck.sh. However, Oracle does not recommend saving or displaying passwords in plain text.

Client

Only Oracle Cloud at Customer This topic applies only to Oracle Cloud at Customer.

The Client tool provides a graphical user interface for the Health Check and Export tools.

Usage:

a2c-client[.sh | .cmd]

By default, the log file for this tool is located in your AppToCloud tools installation at logs/jcsa2c-client.log. If this location is not writable, the tool will attempt to write the log file to either the current directory or the temporary directory for this user.

Health Check

Only Oracle Cloud at Customer This topic applies only to Oracle Cloud at Customer.

The Health Check tool validates a running Oracle WebLogic Server domain to ensure compatibility with the Export tool. It also captures the runtime configuration of the domain and records this information along with the health check results in an archive file.

For detailed instructions, see Check the Health on an On-Premises WebLogic Domain

You must provide a valid set of administrative credentials for the domain. If they are not provided through the available command line options, the program will prompt you for the credentials.

If the connection to the Administration Server requires SSL, set the LAS_SSL_OPTIONS environment variable prior to running the Health Check tool. Refer to the contents of the a2c-healthcheck.sh/cmd file for an example value.

Usage:

a2c-healthcheck[.sh | .cmd] -oh oracle-home -adminUrl admin-url -outputDir output-dir [-wlstTimeout timeout-millis] [[-adminUser admin-user] | [-userConfigFile config-file -userKeyFile key-file] | [-walletDir wallet-dir -adminUserAlias wallet-alias [-walletAutoLogin]]]

Example:

a2c-healthcheck.sh -oh /u01/app/fmw -adminUrl t3://myserver.example.com:7001 -adminUser weblogic -outputDir /u01/jcs_a2c_output
Option Description

oracle-home

Top-level installation directory where WebLogic Server is installed. If not set, the value of the ORACLE_HOME environment variable is used by default.

admin-url

URL to connect to the domain’s Administration Server; for example, t3://myserver.example.com:7001

output-dir

The directory to which the output files should be written; this directory will be created if it does not already exist

timeout-millis

The number of milliseconds WebLogic Scripting Tool (WLST) online commands should wait before timing out.

admin-user (Optional)

User with administrative rights to the domain. The tool will prompt you for the password.

config-file and key-file (Optional)

File containing the encrypted credentials for a user with administrative rights to the domain, along with a file containing the encryption key

Use the WLST storeUserConfig command to generate this file

wallet-dir and wallet-alias (Optional)

The location of an existing Oracle Wallet file and the alias for credentials in this wallet that have administrative rights to the domain. The tool will prompt you for the wallet’s password, if it requires one.

If you specify both wallet-dir and admin-user, admin-user is ignored. If you specify both wallet-dir and config-file, config-file is ignored.

By default, the log file for this tool is located in your AppToCloud tools installation at logs/jcsa2c-healthcheck.log. If this location is not writable, the tool will attempt to write the log file to either the current directory or the temporary directory for this user.

Export

Only Oracle Cloud at Customer This topic applies only to Oracle Cloud at Customer.

The Export tool captures an Oracle WebLogic Server domain’s configuration and applications and records this information in the archive file created by the Health Check tool.

Optionally, the Export tool can also upload these artifacts to an existing storage container in the Oracle Cloud Infrastructure Object Storage Classic. This tool does not require the domain to be running. For detailed instructions, see Export an On-Premises WebLogic Domain.

You must provide a valid set of Oracle Cloud credentials in order to access the storage container. If they are not provided through the available command line options, the program will prompt you for the credentials.

You can export multiple clusters from a domain only if your Oracle Cloud account includes Oracle Identity Cloud Service . Otherwise, you must specify an individual cluster to export.

Usage:

a2c-export[.sh | .cmd] -oh oracle-home -domainDir domain-dir -archiveFile archive-file [-exportSingleCluster] [-clusterToExport cluster-name] [-clusterNonClusteredServers new-cluster-name] [-force] [-cloudStorageContainer storage-container] [[-cloudStorageUser storage-user | [-walletDir wallet-dir -cloudStorageUserAlias wallet-alias [-walletAutoLogin]]]

Example:

a2c-export.sh -oh /u01/app/fmw -domainDir /u01/domains/domain1 -archiveFile /u01/jcs_a2c_output/domain1.zip -cloudStorageContainer Storage-MyAccount/MyContainer -cloudStorageUser myuser
Option Description

oracle-home

Top-level installation directory where WebLogic Server is installed. If not set, the value of the ORACLE_HOME environment variable is used by default.

domain-dir

The directory containing the domain to be exported

archive-file

The archive file produced by the Health Check tool

cluster-name (Optional)

If the domain contains multiple clusters, specify the name of an existing cluster to export.

new-cluster-name (Optional)

If the domain does not contain any clusters, specify the name of a new cluster to add to the exported configuration.

storage-container (Optional)

The name of an existing storage container in Oracle Cloud Infrastructure Object Storage Classic to which to upload the generated AppToCloud artifacts
  • For metered storage subscriptions, use the format Storage-identitydomain/containername

  • For non-metered storage subscriptions, use the format storageservicename-identitydomain/containername

storage-user (Optional)

A cloud user that can access your Oracle Cloud Infrastructure Object Storage Classic container. This user is typically the same as those you use to log in to the My Services dashboard.

The tool will prompt you for the password.

wallet-dir and wallet-alias (Optional)

The location of an existing Oracle Wallet file and the alias for credentials in this wallet that have access to yourOracle Cloud Infrastructure Object Storage Classic container.

The tool will prompt you for the wallet’s password, if it requires one.

If you specify both wallet-dir and storage-user, storage-user is ignored.

The -force option will attempt a domain export even if the previous health check found errors. It is intended only for expert users.

If the -exportSingleCluster option is used and the source domain contains multiple clusters, the user is prompted to enter the name of the cluster to export. Alternatively, you can specify the cluster name with -clusterToExport.

The -exportSingleCluster option is required if the source domain contains multiple clusters and your Oracle Cloud account does not include Oracle Identity Cloud Service.

If the -clusterNonClusteredServers option is used, and the source domain has both clustered and non-clustered managed servers, all existing clusters will be discarded from the exported domain, and a new cluster will be added.

If the -clusterToExport option is used, and the source domain has both clustered and non-clustered managed servers, all other clusters and non-clustered managed servers will be discarded from the exported domain.

If both the -clusterNonClusteredServers and -clusterToExport options are used, -clusterNonClusteredServers takes precedence.

By default, the log file for this tool is located in your AppToCloud tools installation at logs/jcsa2c-export.log. If this location is not writable, the tool will attempt to write the log file to either the current directory or the temporary directory for this user.

Wallet Manager

Only Oracle Cloud at Customer This topic applies only to Oracle Cloud at Customer.

The Wallet Manager tool is used to create, view, and update Oracle Wallet files. An Oracle Wallet enables you to securely store credentials that you use to run various Oracle commands within a single file for convenience.

By default a password is required to access any of the credentials in the file or to update the credentials in the file.

Usage:

a2c-wallet-manager[.sh | .cmd] -walletDir dir-name [-walletAutoLogin] 

Example:

a2c-wallet-manager.sh -walletDir /u01/tools/wallet
Please enter the wallet password: ********
Please re-enter the wallet password: ********
Please specify a command [(l)ist, (a)dd, (u)pdate, (r)emove, (q)uit]: a
Enter the alias for the new credential: wls-domain1-admin
Enter the user for alias wls-domain1-admin: weblogic
Enter the password for alias wls-domain1-admin: ********
Credential with alias wls-domain1-admin has been added to the wallet
Please specify a command [(l)ist, (a)dd, (u)pdate, (r)emove, (q)uit]: l
Wallet Contents:
   1.) User credential: alias = wls-domain1-admin, user = weblogic
   2.) User credential: alias = cloud-account1-storage, user = bill@example.com
Please specify a command [(l)ist, (a)dd, (u)pdate, (r)emove, (q)uit]: q
Option Description

dir-name

Directory in which to create a new wallet or the location of an existing wallet to edit

walletAutoLogin (Optional)

Create a wallet that does not require a password to access or edit it.

If not set, Wallet Manager prompts you for a password.

After starting a Wallet Manager session, you can issue one or more commands:

Command Description

a

Add a new credential to this wallet. Each credential has an alias, user name and password.

l

List the alias and user name for each credential in this wallet

r

Remove an existing credential, given its alias.

u

Update the user name and password of an existing credential

q

Quit Wallet Manager

By default, the log file for this tool is located in your AppToCloud tools installation at logs/jcsa2c-wallet-manager.log. If this location is not writable, the tool will attempt to write the log file to either the current directory or the temporary directory for this user.