Reference
Command reference
Every command and option of sqz, sqz backup and sqz-extract. Run sqz, sqz backup help or sqz-extract without arguments for the same help in your terminal.
sqz#
sqz c [mode] [-j N] <file-or-folder> <archive.sqz>
sqz a [mode] [-j N] <file-or-folder> <archive.sqz>
sqz x [-s N] [-j N] [--file PATH]... <archive.sqz> <output-folder>
sqz t [-s N] [-j N] [--file PATH]... <archive.sqz>
sqz l [-s N] <archive.sqz>
sqz zip [-s N] [--file PATH]... <archive.sqz> <out.zip>
sqz estimate [mode] [-j N] <file-or-folder> [--json]
sqz estimate [-s N] [-j N] [--file PATH]... <archive.sqz> [<output-folder>] [--json]
sqz backup ...
sqz bench [-j N] <file-or-folder>
sqz probe <file-or-folder>
Commands#
| Command | What it does | More |
c | Create a new archive. Refuses to replace an existing file. | Create |
a | Add a snapshot, creating the archive if needed. | Snapshots |
x | Extract into a folder, verifying every file. Never overwrites. | Extract |
t | Verify every file without writing anything. | Test |
l | List files and snapshots. | List |
zip | Export a snapshot as a standard ZIP, checked before it is kept. | Export to ZIP |
estimate | Time, size and memory before packing or extracting, from a sample. | Estimates |
backup | Encrypted backup repository (preview). | below |
bench | Pack the input with all four modes and compare size and time. | Modes |
probe | For each transform, the bytes it saves and its encode and decode cost. | Transforms |
Options#
| Option | Applies to | Meaning |
--max, --maximum | c, a, estimate | Sampled context-mixing / LZMA2 choice, compared with zstd. The default. |
--balanced | c, a, estimate | The smaller of LZMA2 and zstd for each block. |
--smart | c, a, estimate | Per-block cost planner over store, zstd and LZMA2. |
--fast, --instant | c, a, estimate | zstd, without media transforms. |
-j N, --threads N | all | Threads. Default: every core for Fast, up to 8 otherwise. |
--block MiB | c, a, estimate | Largest solid block, 4 to 1024 MiB (default 32). |
-s N, --snapshot N | x, t, l, zip, estimate | Snapshot N, 1 being the oldest. Default: the latest. |
--file PATH | x, t, zip, estimate | An exact path in the archive, with forward slashes. Repeatable. |
--estimate | c, a, x | Print an estimate before the job. |
--no-estimate | c, a | Skip the automatic estimate for inputs of 1 GiB or more. |
--json | estimate | Print the estimate as JSON. |
--no-transforms | c, a, estimate | Turn off JPEG and DEFLATE transforms (for comparisons). |
--model-family | c, a, estimate | Experimental tensor-aware path for related safetensors checkpoints. |
Exit codes: 0 success, 1 error, 2 command line not understood.
sqz backup#
<repo> is a folder or s3://bucket/prefix. <snapshot> is latest, a number, or the start of an ID.
| Command | What it does |
init <repo> | Create a repository; asks for a password and shows the recovery key once. |
run <repo> <file-or-folder> | Save a new snapshot. Options: --read-all, --timings, --vss or --vss-fallback, --usn-check or --usn. |
list <repo> | Snapshots, oldest first, with protected, verified and drill status. |
restore <repo> <snapshot> <dest> | Restore into a folder; never overwrites. Options: --file PATH (a file or folder, repeatable), --acls (Windows). |
check <repo> | Verify structure. --read-data decrypts and verifies everything and records the latest verified snapshot. |
forget <repo> <snapshot>... | Remove named snapshots (data stays until prune). |
forget <repo> --keep-... | Keep by rule: --keep-last, --keep-hourly, --keep-daily, --keep-weekly, --keep-monthly, --keep-yearly. With --dry-run and --prune. |
prune <repo> | Reclaim unused data. --dry-run, --grace HOURS (24), --max-waste PERCENT (5). |
protect <repo> <snapshot> | Never forget this snapshot. unprotect undoes it. |
add-password <repo> | Add another password. |
copy <repo> <replica> | Make or update a replica without the password. --mirror, --dry-run. |
drill <repo> [<snapshot>] | Rehearse a restore without writing. --sample N (20), --seed N, --full. |
On any command, --recovery unlocks with the recovery key instead of a password, and --password-stdin reads the secrets from standard input, one per line: the password (or recovery key), then the new password for add-password; init reads only the new password. --json on init, run and list prints one JSON object on standard output (times in Unix seconds) and the messages on standard error.
Environment#
| Variable | Meaning |
SQZ_PASSWORD | Repository password |
SQZ_NEW_PASSWORD | New password for init and add-password |
SQZ_RECOVERY_KEY | Recovery key, with --recovery |
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, AWS_REGION | S3 credentials and region |
SQZ_S3_ENDPOINT | S3 endpoint for MinIO, R2, B2, Ceph and others |
Exit codes#
| Code | Meaning |
0 | Success |
1 | Error |
2 | Command line not understood |
3 | run: snapshot saved, some files could not be read |
4 | run --vss-fallback: backed up live files, no shadow copy |
5 | run --usn-check: the change journal missed a changed file |
sqz-extract <archive.sqz> [output-folder]
sqz-extract -t <archive.sqz>
sqz-extract -l <archive.sqz>
sqz-extract --info <archive.sqz>
sqz-extract --version
| Option | Meaning |
-t | Verify every file without writing |
-l | List files and snapshots |
--info | Format version and contents in brief |
--version | Format versions and features this build reads |
-s N | Snapshot N (1 = oldest); default the latest |
--file PATH | Only this archive path (repeatable) |
-j N | Threads |
Without an output folder it extracts into a new folder named after the archive, next to it. Exit codes: 0 all verified, 1 failure, 2 usage, 3 the archive needs a newer sqz-extract.