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.2.tar.gz (25.1 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.2-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ec2_restore-1.0.2.tar.gz
  • Upload date:
  • Size: 25.1 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.2.tar.gz
Algorithm Hash digest
SHA256 e02344520dba0e28e9c74b90776177d5aa2aa588348b51a6274067b3007d5cb5
MD5 0f09d67ad52f71644d73096d6d7171fb
BLAKE2b-256 2a6da409a148fd79ed6ef2d80ec17a27e153dfa9028fefed3f04acdd8a67377a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ec2_restore-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 25.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 509c6cb9edc04a5a2ee119d196b595e8876e353f974dbd61614766dd30cf5dd9
MD5 7fac5913832983005f3eef68c2e3b353
BLAKE2b-256 87c5c06bde2ad43b5385c984e878f49df51e30135f0a3c38d4eac4fb7eb4fa52

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