copy
Copy a snapshot from one backend to another
Usage
aegis copy [OPTIONS]
Options
| Option | Description |
|---|---|
--repo | Specify a path to a repo to use instead of the current working directory |
--snapshot | A query specifying the snapshot to use.
This can be "latest", a snapshot root checksum, or an index number.
Use aegis list-snapshots --backend {backend name} to get checksums/indexes.
(default: |
--from | The name of the backend to copy the snapshot from, if omitted use default_backend |
--to | The name of the backend to copy the snapshot to, if omitted use default_backend |
Description
The copy command copies a snapshot and all its referenced blobs from one backend to another.
The copy is incremental: blobs that already exist in the destination are skipped.
Examples
Given the aegis.toml:
[backends.local]
type = "fs"
dir = "/path/to/local/backup"
[backends.cloud]
type = "b2"
# ...
You can copy snapshots from local to cloud using:
# Copy the latest snapshot:
aegis copy --from local --to cloud
# Or copy a specific snapshot by index (acquired by list-snapshots):
aegis copy --from local --to cloud --snapshot 3
# Or root SHA:
aegis copy --from local --to cloud --snapshot d0d45b7a3bfcda9e72629cfb5f90d51bf47129cb7789050c799a520441f5e4e7
If you don't specify --from/--to, the default backend is used as the source/destination. At
least one must be specified.