snapdir fetch

Fetch a snapshot from a store into the local cache.

fetch downloads the manifest and objects for a snapshot from a --store into the local cache, without checking them out to a working directory. Use snapdir checkout afterward to materialize the files, or snapdir pull to do both at once.

Usage

snapdir fetch [OPTIONS]

Options

fetch takes no positional arguments.

Option Description
--store <URI> Source manifest store URI. Required unless SNAPDIR_STORE is set. Env: SNAPDIR_STORE.
--objects-store <URI> Shared object-pool store URI for split snapshots. Env: SNAPDIR_OBJECTS_STORE.
--catalog <NAME> Catalog adapter to record this snapshot's location in. Env: SNAPDIR_CATALOG; unset uses the default catalog, none disables catalog writes.
--cache-dir <DIR> Directory where the object cache is stored. Env: SNAPDIR_CACHE_DIR.
--id <ID> Snapshot ID to fetch.
-j, --jobs <N> Max concurrent object transfers. Env: SNAPDIR_JOBS.
--limit-rate <RATE> Limit aggregate transfer bandwidth. Env: SNAPDIR_LIMIT_RATE.
--adaptive[=<FRACTION>] Adaptively tune transfer concurrency/bandwidth. Env: SNAPDIR_ADAPTIVE.
--max-jobs <N> Adaptive concurrency ceiling. Env: SNAPDIR_MAX_JOBS.
--max-retries <N> Total retry attempts per network request, including the first.
--retry-base-ms <MS> Base retry backoff delay in milliseconds.
--retry-max-ms <MS> Maximum retry backoff delay in milliseconds.
--max-requests <N> Cap request rate; 0/unset uses the backend default.
--force / --keep / --dryrun Transfer action flags accepted by fetch. --linked appears in the shared transfer help but fetch does not materialize files.
-q, --quiet / --no-progress / --color <WHEN> / --verbose Universal output-control options.

If the manifest is cached but local objects are missing, fetch re-fetches the missing objects instead of treating the cache as complete.

Examples

Fetch a snapshot by ID from an S3 store:

snapdir fetch --id 1220abc... --store s3://my-bucket/snapshots

Fetch from a local file store, adaptively tuning concurrency:

snapdir fetch --id 1220abc... --store file:///srv/backups --adaptive

See also