snapdir pull

Fetch a snapshot from a store and check it out to the given path.

pull is the one-step combination of snapdir fetch and snapdir checkout: it downloads the snapshot from a --store into the cache and materializes it at the destination directory. Use --delete when the destination should be pruned to exactly the files in the snapshot.

Usage

snapdir pull [OPTIONS] [PATH]

Arguments

Argument Description
[PATH] Destination directory.

Options

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 pull.
-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.
--linked Materialize via read-only symlinks into local content-addressed objects. The source must be local file:// objects; remote stores are refused.
--force / --keep / --dryrun Transfer action flags accepted by pull.
--delete Prune destination entries not present in the snapshot manifest; refuses dangerous destinations even with --force.
--exclude <PATTERN> With --delete, protect destination paths matching the extended-regex pattern from pruning. Repeatable and comma-delimited.
-q, --quiet / --no-progress / --color <WHEN> / --verbose Universal output-control options.

If the manifest is cached but local objects are missing, pull re-fetches the missing objects before checkout.

Examples

Pull a snapshot from S3 into a new directory:

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

Pull from a local file store using read-only symlinks:

snapdir pull --id 1220abc... --store file:///srv/backups --linked ./restored

Keep a runtime directory as an exact mirror of a snapshot:

snapdir pull --id 1220abc... --store file:///srv/backups --linked --delete ./runtime-inputs

See also