Skip to main content

A powerful tool for restoring EC2 instances from AMIs

Project description

EC2 Restore Tool

A command-line tool for restoring EC2 instances from AMIs, with support for both full instance restore and volume-level restore.

Features

  • Full instance restore from AMI
  • Volume-level restore from AMI
  • Preserves network interfaces and private IPs
  • Interactive CLI with rich progress indicators
  • Detailed restoration reports
  • Support for multiple instances
  • Backup of instance metadata before restore

Installation

pip install ec2-restore

Configuration

Create a config.yaml file with your AWS credentials and restore settings:

aws:
  profile: default  # AWS profile name
  region: us-west-2  # AWS region

restore:
  max_amis: 10  # Maximum number of AMIs to show
  log_file: logs/ec2_restore.log  # Log file path
  log_level: INFO  # Logging level

Usage

Full Instance Restore

ec2-restore --instance-id i-1234567890abcdef0

Volume Restore

ec2-restore --instance-id i-1234567890abcdef0 --restore-type volume

Restore by Instance Name

ec2-restore --instance-name my-instance

Restore Multiple Instances

ec2-restore --instance-ids i-1234567890abcdef0,i-0987654321fedcba0

Options

  • --instance-id: EC2 instance ID to restore
  • --instance-name: EC2 instance name (tag) to restore
  • --instance-ids: Comma-separated list of EC2 instance IDs to restore
  • --config: Path to configuration file (default: config.yaml)

Development

  1. Clone the repository:
git clone https://github.com/yourusername/ec2-restore.git
cd ec2-restore
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install development dependencies:
pip install -e ".[dev]"

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ec2_restore-1.0.1.tar.gz (25.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ec2_restore-1.0.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file ec2_restore-1.0.1.tar.gz.

File metadata

  • Download URL: ec2_restore-1.0.1.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for ec2_restore-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5527901dd348bbaf0b26b939e43e6c546b3fd6442d19619f0a523a937f05b6df
MD5 cd9628beb3d9e2f696ca517b7385adf1
BLAKE2b-256 7e1945ccef175141e239a5c2a5e3ee9dbd2b13cf09a42d22de13d2669b30dfa7

See more details on using hashes here.

File details

Details for the file ec2_restore-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ec2_restore-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for ec2_restore-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c9d52488d4570ed27d517bfc373e784988b213a9348aa64d3a1cee2273c309b
MD5 4402ba1f901886f2d5397968ab9622dd
BLAKE2b-256 6e28c45fa40409009f94ee6dae099e1852d2ed0b3ce3720b05ebd97315674222

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page