#snapshot #aws #amazon #ebs #aws-cli #command-line-interface #aws-sdk

bin+lib coldsnap

A library and command-line interface for uploading and downloading Amazon EBS snapshots

14 releases

0.6.2 Aug 2, 2024
0.6.1 Mar 15, 2024
0.6.0 Aug 22, 2023
0.5.1 Apr 11, 2023
0.2.0 Nov 11, 2020

#2399 in Network programming

Download history 623/week @ 2024-07-27 1163/week @ 2024-08-03 879/week @ 2024-08-10 868/week @ 2024-08-17 242/week @ 2024-08-24 1441/week @ 2024-08-31 1097/week @ 2024-09-07 1252/week @ 2024-09-14 1592/week @ 2024-09-21 604/week @ 2024-09-28 489/week @ 2024-10-05 921/week @ 2024-10-12 287/week @ 2024-10-19 554/week @ 2024-10-26 338/week @ 2024-11-02 287/week @ 2024-11-09

1,593 downloads per month

Apache-2.0

71KB
1.5K SLoC

coldsnap

coldsnap is a command-line interface that uses the Amazon EBS direct APIs to upload and download snapshots.

It does not need to launch an EC2 instance or manage EBS volume attachments. It can be used to simplify snapshot handling in an automated pipeline.

Usage

Credentials

Coldsnap uses the same credential mechanisms as the aws cli. For example, if you have credentials in ~/.aws/credentials, these will be used. You can specify the name of the profile to be used by adding --profile profile-name.

You can also define environment variables, for example:

$ export AWS_ACCESS_KEY_ID=EXAMPLEAKIAIOSFODNN7
$ export AWS_SECRET_ACCESS_KEY=EXAMPLEKEYwJalrXUtnFEMI/K7MDENG/bPxRfiCY
$ export AWS_DEFAULT_REGION=us-west-2

If the name of a profile is provided, then it will be used. If not, then the default behavior of the AWS Rust SDK credential provider will be used. Here is the description of the default behavior.

Upload

Upload a local file into an EBS snapshot:

$ coldsnap upload disk.img

If you want to wait for the uploaded snapshot to be in "available" state, add --wait:

$ coldsnap upload --wait disk.img

Alternately, you can use coldsnap wait, which offers more flexibility in terms of wait duration and behavior.

$ coldsnap wait snap-1234

Download

Download an EBS snapshot into a local file:

$ coldsnap download snap-1234 disk.img

Run coldsnap --help to see more options.

Installation

coldsnap can be installed using cargo.

$ cargo install --locked coldsnap

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

Dependencies

~80MB
~1M SLoC