Small CLI utility for reading Elasticsearch snapshot repository metadata from S3.
- Python managed by
uv - AWS CLI v2 configured with credentials that can access the snapshot bucket
Run commands with uv run:
uv run main.py list s3://my-snapshot-bucket/path/to/repoThis command:
- Shows the repository metadata files needed (
index.latestwhen present and latestindex-N) - Prompts for confirmation
- Downloads those files under
./downloads - Saves discovered index names to
./index-list.json
Download a specific index payload as raw JSON:
uv run main.py download s3://my-snapshot-bucket/path/to/repo my-index-nameThis command:
- Resolves the index in repository metadata
- Shows all files that will be downloaded for that index payload
- Prompts for confirmation
- Downloads files under
./downloads - Saves raw JSON for the target index to
./index.json
--download-dirto choose a different download directory--output-fileto choose the output JSON file path
Use cold-qa01 as an example: https://us-east-1.console.aws.amazwinlogbeat-unknown-2023.06.05-000001on.com/s3/buckets/cold-qa01?region=us-east-1&prefix=2022-Q1/&showversions=false
uv run main.py list s3://cold-qa01/2022-Q1/
uv run main.py download s3://cold-qa01/2022-Q1/ 'webroot-unknown-2023.06.14-000001'