app2container extract command - AWS App2Container

app2container extract command

Generates an application archive for the specified application. Before you call this command, you must call the analyze command.

Note

If the command fails, an error message is displayed in the console, followed by additional messaging to help you troubleshoot.

When you ran the init command, if you chose to automatically upload logs to App2Container support if an error occurs, App2Container notifies you of the success of the automatic upload of your application support bundle.

Otherwise, App2Container messaging directs you to upload application artifacts by running the upload-support-bundle command for additional support.

Syntax

app2container extract --application-id id [--output s3] [--help]

Parameters and options

Parameters

--application-id id

The application ID (required). After you run the inventory command, you can find the application ID in the inventory.json file in one of the following locations:

  • Linux: /root/inventory.json

  • Windows: C:\Users\Administrator\AppData\Local\.app2container-config\inventory.json

--profile admin-profile

Use this option to specify a named profile to run this command. For more information about named profiles in AWS, see Named profiles in the AWS Command Line Interface User Guide

Options

--output s3

If specified, this option writes the archive file to the Amazon S3 bucket that you specified when you ran the init command.

--force

Bypasses the disk space prerequisite check.

--help

Displays the command help.

Output

This command creates an archive file. When you use the --output s3 option, the archive is written to the Amazon S3 bucket that you specified when you ran the init command. Otherwise, the archive is written to the output location that you specified when you ran the init command.

Examples

Choose the operating system platform tab for the application server or worker machine where you run the command.

Linux

The following example shows the extract command with the --application-id parameter and no additional options.

$ sudo app2container extract --application-id java-tomcat-9e8e4799 √ Extracted container artifacts for application √ Application archive file created at: /root/app2container/java-tomcat-9e8e4799/java-tomcat-9e8e4799-extraction.tar Extraction successful for application java-tomcat-9e8e4799 Please transfer this tar file to your worker machine and run, "app2container containerize --input-archive <extraction-tar-filepath>"
Windows

The following example shows the extract command with the --application-id parameter and no additional options.

PS> app2container extract --application-id iis-smarts-51d2dbf8 √ Extracted container artifacts for application Extraction successful for application iis-smarts-51d2dbf8