Expand description
§ssstar
Highly concurrent archiving of S3 objects to and from tar archives.
This is the Rust library crate which powers the ssstar
CLI. If you’re looking for the
ssstar
command line utility, see the ssstar-cli
crate.
To create a tar archive containing S3 objects, instantiate a CreateArchiveJob
:
// Write the archive to a local file
let target = TargetArchive::File("test.tar".into());
let mut builder = CreateArchiveJobBuilder::new(Config::default(), target);
// Archive all of the objects in this bucket
builder.add_input(&"s3://my-bucket".parse()?).await?;
let job = builder.build().await?;
job.run_without_progress(futures::future::pending()).await?;
Target archives can be written to a local file, an S3 bucket, or an arbitrary Tokio AsyncWrite
implementation. See
TargetArchive
for more details.
Restoring a tar archive to object storage is similarly straightforward:
// Read the archive from a local file
let source = SourceArchive::File("test.tar".into());
// Extract the archive to an S3 bucket, prepending a `foo/` prefix to every file path in
// the archive
let target = "s3://my-bucket/foo/".parse::<url::Url>()?;
let mut builder = ExtractArchiveJobBuilder::new(Config::default(), source, target).await?;
// Extract only text files, in any directory, from the archive
builder.add_filter("**/*.txt")?;
let job = builder.build().await?;
job.run_without_progress(futures::future::pending()).await?;
Structs§
- Config
- The configuration settings that control the behavior of archive creation and extraction.
- Create
Archive Job - A job which will create a new tar archive from object store inputs.
- Create
Archive JobBuilder - Credentials
Provider - Custom credentials provider that actually implements
ProvideCredentials
and implements the needed traits to make it possible to put it into config as an option - Credentials
Update Output - This represents the credentials to access to AWS API.
- Extract
Archive Job - Extract
Archive JobBuilder
Enums§
- Extract
Filter - A parsed filter string which can be used to select a subset of the objects in the archive.
- S3Tar
Error - Source
Archive - Represents from where the archive will be read
- Target
Archive - Represents where we will write the target archive
Traits§
- Create
Progress Callback - A trait which callers can implement to get detailed progress updates as archive creation is progressing.
- Credentials
Update Callback - This is a trait that represents a callback to update credentials when they become expired
- Extract
Progress Callback - A trait which callers can implement to get detailed progress updates as the extract operation is progressing.