Amazon Elastic Compute Cloud
User Guide for Linux Instances

Working with EC2Rescue for Linux

The following are common tasks to get you started using this tool.

Getting Help

EC2Rescue for Linux includes a help file that gives you information and syntax for each available command.

To use the help command

  • Use the help command to get general help:

    ./ec2rl help

To list the available modules

  • List all available modules:

    ./ec2rl list

To get help for a specific module

  • List the help details for a specific command:

    ./ec2rl help module_name

    Example command for showing the help file for the dig module:

    ./ec2rl help dig

Running a Module

You can run an EC2Rescue for Linux using these steps.

To run a module

  1. Run a module:

    ./ec2rl run --only-modules=module_name --arguments

    Example command, using the dig module to query the domain:

    ./ec2rl run --only-modules=dig
  2. View the results:

    cat /var/tmp/ec2rl/logfile_location


    cat /var/tmp/ec2rl/2017-05-11T15_39_21.893145/mod_out/run/dig.log

Uploading the Results

If AWS Support has requested the results or to share the results from an S3 bucket, upload using the EC2Rescue for Linux CLI tool. The output of the EC2Rescue for Linux commands should provide the commands to achieve this.

To upload to support

  • Upload the results to support:

    ./ec2rl upload --upload-directory=/var/tmp/ec2rl/2017-05-11T15_39_21.893145 --support-url="URLProvidedByAWSSupport"

To upload to an S3 bucket

  • To upload the results to an S3 bucket:

    ./ec2rl upload --upload-directory=/var/tmp/ec2rl/2017-05-11T15_39_21.893145 --presigned-url="YourPresignedS3URL"


    For more information about generating presigned URLs for Amazon S3, see Uploading Objects Using Pre-Signed URLs.

Creating Backups

Create a backup for your instance, one or more volumes, or a specific device ID using the following commands.

To back up an instance

  • Create a backup of your instance:

    ./ec2rl run --backup=ami

To back up all volumes

  • Create a backup of all volumes associated with the instance:

    ./ec2rl run --backup=allvolumes

To back up a volume

  • Create a backup of a single volume:

    ./ec2rl run --backup=volume ID