UFOP CLI Reference
Version 0.1.0
Overview
The ufop command-line interface provides scriptable access to the Unified File Operations Platform. It is written in Rust for performance and cross-platform support.
Installation
The CLI is distributed as a standalone binary. Source builds use the repository’s pinned Rust 1.100 toolchain, including the patched database and archive dependencies.
# Build from source
cd cli
cargo build --release
Global Options
| Flag | Description |
|---|---|
--format <FORMAT> | Output format: human, json, yaml, csv (default: the profile's default_format, else human) |
--json | Shorthand for --format json |
--yaml | Shorthand for --format yaml |
--csv | Shorthand for --format csv |
--profile <NAME> | Named profile to use for this run (or set UFOP_PROFILE); see ufop profile |
--dry-run | Show what would happen without executing |
--limit <RATE> | Bandwidth limit (e.g., 1M, 500K, 2G) |
--api-url <URL> | API server URL for this run (or set UFOP_API_URL); not saved unless a command changes it |
-v, -vv, -vvv | Verbosity level (info, debug, trace) |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Partial failure |
| 2 | Full failure |
| 3 | Authentication error |
| 4 | Policy violation |
CSV output
--csv writes RFC 4180 records (CRLF line ends) to stdout; status messages go to stderr, so ufop … --csv > out.csv is pure data. Lists become one row per item (columns in first-seen order), a single result one row, and nested values compact JSON. Cells a spreadsheet would treat as a formula (starting =, +, -, @, other than numbers) are prefixed with '. In --json mode ufop transfer also streams progress events, one JSON object per line; YAML and CSV print only the result.
Configuration and profiles
Settings live in ~/.config/ufop/config.toml (owner-only; UFOP_CONFIG overrides the path). Named profiles keep separate API servers, tokens, ufop server sign-ins and default output formats; saved connections are shared.
ufop profile create staging --api https://staging.example.com --default-format json
ufop --profile staging login --token <TOKEN> # signs in to that profile only
ufop --profile lab server login --url http://lab:8200 --password …
ufop profile use staging # default for later runs
ufop profile list # `*` marks the active profile
ufop profile show # tokens are masked
ufop --profile default status # the top-level settings
ufop profile remove staging # not while it is in use
The active profile is --profile / UFOP_PROFILE, else the one chosen with ufop profile use, else default. A --profile that does not exist is an error, except for login and server login, which create it. ufop profile create --from <name> copies another profile, tokens included.
Commands
ufop login
Authenticate with the UFOP server.
# Interactive login
ufop login
# Login with API token
ufop login --token <TOKEN>
# Login to specific server
ufop login --server https://api.example.com --token <TOKEN>
Options:
| Flag | Description |
|---|---|
--token <TOKEN> | API key or authentication token |
--server <URL> | Server URL to authenticate against |
ufop connection
Manage saved connections (SFTP, FTP, WebDAV, S3, etc.).
ufop connection list
List all saved connections.
# List all connections
ufop connection list
# Filter by protocol
ufop connection list --protocol sftp
# Output as JSON
ufop connection list --json
Options:
| Flag | Description |
|---|---|
--protocol <PROTO> | Filter by protocol (sftp, ftp, webdav, s3, etc.) |
ufop connection add
Add a new connection.
# Add an SFTP connection
ufop connection add my-server sftp://user@host.example.com
# Save password in keychain
ufop connection add prod-server sftp://deploy@prod.example.com --save-password
# Add an S3 connection
ufop connection add my-bucket s3://my-bucket.s3.amazonaws.com
Arguments:
| Argument | Description |
|---|---|
<NAME> | Connection name |
<URI> | Connection URI (e.g., sftp://user@host, ftp://host, s3://bucket) |
Options:
| Flag | Description |
|---|---|
--save-password | Save password in the OS keychain |
ufop connection test
Test connectivity of a saved connection or URI.
ufop connection test my-server
ufop connection test sftp://user@host.example.com
ufop connection remove
Remove a saved connection.
ufop connection remove my-server
ufop transfer
Copy local files and folder contents. Human, JSON and YAML output execute the same
operation. --verify compares copied bytes with the source before reporting
verification. Existing files in a directory transfer are skipped unless
--overwrite is selected. A skipped file produces partial status and exit code 1.
ufop transfer /path/to/source /path/to/dest --verify
ufop --json transfer /src /dst --overwrite --verify
ufop --yaml transfer /src /dst --verify
ufop transfer /src /dst --dry-run
Remote URI transfers return an error. Use a connected location in the desktop
transfer queue. Resuming and bandwidth limits are available through ufop copy.
| Flag | Behavior |
|---|---|
--overwrite | Replace destination files after staging each copy |
--verify | Compare actual source and destination bytes |
--resume | Returns an error directing you to ufop copy /Z |
--parallel <N> | Retained for compatibility, local transfer runs serially |
ufop copy
Run the shared Robocopy-compatible engine. Preview with /L, resume with /Z
and limit bandwidth with the global --limit option.
ufop copy /src /dst /E /L
ufop --limit 10M copy /src /dst /E /Z
This command uses Robocopy exit codes. Codes below 8 describe successful work or differences. Code 1 means files were copied. Codes 8 and above indicate failures.
ufop sync
Manage sync pairs.
ufop sync list
List all sync pairs.
ufop sync list
ufop sync list --json
ufop sync create
Create a new sync pair.
# One-way sync
ufop sync create my-backup /home/user/documents /mnt/backup/documents
# Bidirectional sync
ufop sync create team-files /shared/docs sftp://nas/docs --direction bidirectional
# Scheduled sync
ufop sync create nightly-backup /data /backup/data --schedule "0 2 * * *"
Arguments:
| Argument | Description |
|---|---|
<NAME> | Sync pair name |
<SOURCE> | Source path or URI |
<DEST> | Destination path or URI |
Options:
| Flag | Description |
|---|---|
--direction <DIR> | bidirectional, source-to-dest (default), dest-to-source |
--schedule <CRON> | Cron expression for automatic sync |
ufop sync run
Run a sync pair.
ufop sync run my-backup
ufop sync run my-backup --dry-run
ufop sync delete
Delete a sync pair.
ufop sync delete my-backup
ufop compat
Check file name compatibility across platforms.
# Check specific paths
ufop compat /path/to/check
# Check against specific platforms
ufop compat /path/to/check --targets windows,linux
# JSON output
ufop compat /path/to/check --json
Arguments:
| Argument | Description |
|---|---|
<PATHS> | One or more paths to check |
Options:
| Flag | Description |
|---|---|
--targets <PLATFORMS> | Comma-separated list: windows, macos, linux |
ufop checksum
Compute or verify file checksums.
# Compute SHA-256 (default)
ufop checksum file.txt
# Compute MD5
ufop checksum file.txt --algorithm md5
# Multiple files
ufop checksum file1.txt file2.txt file3.txt
# Verify against known hash
ufop checksum file.txt --verify abc123def456...
# JSON output
ufop checksum file.txt --json
Arguments:
| Argument | Description |
|---|---|
<PATHS> | One or more files to checksum |
Options:
| Flag | Description |
|---|---|
--algorithm <ALG> | md5, sha1, sha256 (default: sha256) |
--verify <HASH> | Verify file matches the provided hash |
ufop duplicates
Find duplicate files in a directory.
# Report duplicates
ufop duplicates /path/to/scan
# Only consider files above 1MB
ufop duplicates /path/to/scan --min-size 1048576
# Auto-delete, keeping newest
ufop duplicates /path/to/scan --action keep-newest
# Dry run before deleting
ufop duplicates /path/to/scan --action keep-newest --dry-run
Arguments:
| Argument | Description |
|---|---|
<PATH> | Directory to scan |
Options:
| Flag | Description |
|---|---|
--min-size <BYTES> | Minimum file size to consider (default: 1) |
--action <ACTION> | report (default), keep-newest, keep-largest, delete |
ufop rename
Batch rename files using patterns or find/replace.
# Pattern-based rename
ufop rename /path/to/files --pattern "vacation_{counter}.{ext}"
# Find and replace
ufop rename /path/to/files --find "old_prefix" --replace "new_prefix"
# Regex find and replace
ufop rename /path/to/files --find "IMG_(\d+)" --replace "photo_\1" --regex
# Case transform
ufop rename /path/to/files --case lower
# Counter with padding
ufop rename /path/to/files --pattern "{name}_{counter}.{ext}" --start 1 --step 1 --pad 3
# Preview changes without applying
ufop rename /path/to/files --find "old" --replace "new" --dry-run
Arguments:
| Argument | Description |
|---|---|
<PATH> | File or directory to rename |
Options:
| Flag | Description |
|---|---|
--pattern <PATTERN> | Pattern with tokens: {name}, {ext}, {num}, {date}, {parent}, {counter} |
--find <STRING> | String to find (literal or regex) |
--replace <STRING> | Replacement string |
--regex | Use regex for find/replace |
--case <CASE> | Case transform: upper, lower, title, sentence |
--start <N> | Counter start value (default: 1) |
--step <N> | Counter step (default: 1) |
--pad <N> | Zero-padding width for counter (default: 0) |
ufop archive
Archive operations (create, extract, list).
ufop archive create
Create an archive.
# Create a ZIP
ufop archive create output.zip file1.txt dir1/
# Create a tar.gz
ufop archive create backup.tar.gz /data --format tar.gz
# Encrypted ZIP
ufop archive create secure.zip secret.txt --password mypassword
# Custom compression level
ufop archive create output.zip data/ --level 9
Arguments:
| Argument | Description |
|---|---|
<OUTPUT> | Output archive path |
<PATHS> | Files and directories to include |
Options:
| Flag | Description |
|---|---|
--format <FMT> | zip (default), tar, tar.gz, 7z |
--password <PASS> | Password for encryption (ZIP, 7Z) |
--level <N> | Compression level 0-9 (default: 6) |
ufop archive extract
Extract an archive.
ufop archive extract backup.zip
ufop archive extract backup.zip --dest /tmp/extracted
ufop archive extract secure.zip --password mypassword
Arguments:
| Argument | Description |
|---|---|
<ARCHIVE> | Archive file to extract |
Options:
| Flag | Description |
|---|---|
--dest <DIR> | Destination directory (default: current directory) |
--password <PASS> | Password for encrypted archives |
ufop archive list
List archive contents.
ufop archive list backup.zip
ufop archive list backup.zip --json
Arguments:
| Argument | Description |
|---|---|
<ARCHIVE> | Archive file to list |
Options:
| Flag | Description |
|---|---|
--password <PASS> | Password for encrypted archives |
ufop backup repository format
Format commands of the versioned backup engine (all take --dest, --prefix and the passphrase options of ufop backup run). See backup-repository-format.md.
ufop backup format-info --dest /mnt/backup # version, chunker, codecs, cipher, layout
ufop backup upgrade --dest /mnt/backup # format 1 → 2 (header only)
ufop backup upgrade --dest /mnt/backup --rollback # back to format 1 before any format 2 write
UFOP_NEW_PASSPHRASE=… ufop backup change-password --dest /mnt/backup [--new-passphrase-file F] [--kdf-preset sensitive]
ufop backup reshard --dest /mnt/backup --layout sharded --shard-prefix-len 2 [--dry-run]
New backups (ufop backup run) take --format-version 1|2, --chunker fixed|fastcdc, --block-codec deflate|zstd, --cipher aes256-gcm|chacha20-poly1305 and --layout flat|sharded with --shard-prefix-len 1-4. They apply only when the repository is created.
ufop backup repository safety
Locks, read-only connections, checkpoints and the local database key. See backup-safety.md.
ufop backup lock status --dest /mnt/backup # who holds the lock (exit 1 while in use)
ufop backup lock break --dest /mnt/backup --yes [--owner-id ID] # only when the holder is no longer running
ufop backup restore --dest /mnt/backup --read-only --target ~/out # nothing is written, not even a lock
ufop backup run … --db-key-source keyring # encrypted local database, key in the OS keychain
ufop backup run … --db-key-source env:UFOP_DB_KEY # key from an environment variable (64 hex digits)
ufop backup db encrypt ~/.local/share/ufop/cli-backups/x.sqlite [--db-key-source env:VAR] [--decrypt]
Every command with --dest also takes --read-only, --db-key-source keyring|env:VAR|none (default none; an encrypted database without its key is rebuilt from the destination), --lock-ttl-secs (default 1800), --clock-skew-warn-secs (300) and --clock-skew-abort-secs (3600; 0 turns a limit off). ufop backup run takes --checkpoint-interval-secs (default 900) and --checkpoint-interval-bytes (default 0); 0 turns them off.
ufop backup versions, retention, copies and sharing
Notes, tags, pins, retention previews, count-based retention, copying versions and shared repositories. See backup-versions.md.
ufop backup run … --note "before upgrade" --tag env=prod --tag release
ufop backup run … --keep-latest 2 --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --keep-yearly 3
ufop backup list --dest /mnt/backup [--tag env=prod] # table: time, files, size, added, pin, host, note, tags
ufop backup pin --dest /mnt/backup 3 [--reason audit] # Keep forever
ufop backup unpin --dest /mnt/backup 3
ufop backup annotate --dest /mnt/backup 0 --note "release 2.1" [--tag k=v …] [--clear-tags]
ufop backup delete --dest /mnt/backup 3 --force # pinned versions need --force
ufop backup retention preview --dest /mnt/backup --keep-daily 7 # kept/deleted per version, with the reason
ufop backup retention apply --dest /mnt/backup --keep-versions 10 [--dry-run] [--allow-full-removal]
UFOP_TO_PASSPHRASE=… ufop backup copy-versions --dest /mnt/backup 0 2 --to /mnt/offsite \
[--to-prefix ufop] [--to-dbpath F] [--to-passphrase-env VAR] [--to-no-encryption] \
[--to-format-version 1|2] [--to-chunker fixed|fastcdc] [--dry-run]
ufop backup run … --shared --job-id laptop-docs # create a shared repository
ufop backup share --dest /mnt/backup [--keep-identities] # share an existing format 2 repository
ufop backup sources --dest /mnt/backup # computers and jobs writing to it (* = this one)
ufop backup restore --dest /mnt/backup --source-id <id> --target ~/out # another source's version
Every repository command also takes --job-id (the source a CLI job writes as; default derived from --dest and --prefix, so give each CLI job that shares a repository its own), --hostname and --username (record another computer or user, to continue its history) and --source-id ID|* (work on another source of a shared repository). ufop backup run also takes --shared-gc-delay-hours (default 4): in a shared repository, compaction leaves younger volumes alone. Any non-zero --keep-latest|hourly|daily|weekly|monthly|yearly selects count-based retention over --keep-versions, --keep-days and --retention-policy.
ufop backup sources and runs
Ignore files, one filesystem, the read-error policy, rehash, standard input, the upload limit, parallel hashing, snapshot methods, the estimate and backing up every job. See backup-sources-and-runs.md.
ufop backup run … --ignore-file .ufopignore --ignore-file .backupignore --respect-gitignore
ufop backup run … --one-file-system # mount points inside a source stay empty
ufop backup run … --on-file-error fail --on-dir-error continue --on-unknown-entry warn [--fail-fast] [--max-errors 50]
ufop backup run … --rehash-percent 5 # re-check ~5% of unchanged files per run
ufop backup run … --max-upload 20G # partial version at 20 GiB; the next run continues
ufop backup run … --parallel-file-threshold 512M # 0 = off; blocks are identical either way
ufop backup run … --snapshot-policy required --snapshot-provider zfs # auto | lvm | zfs | btrfs
pg_dump mydb | ufop backup stdin --dest /mnt/backup --name mydb.sql # standard input as /stdin/mydb.sql
ufop backup estimate --dest /mnt/backup --source ~/Documents [--assumed-speed 20M] [--largest 10]
ufop server run-all [--job Docs …] [--scheduled-only] [--dry-run] [--wait] # every job of the signed-in ufop-server
ufop server tokens create ci --scope run --job Docs [--job …] [--days 30] # API token limited to some jobs
ufop server login --url https://backup:8200 --user alice --password … # an account (default user: admin)
ufop server user list | add NAME --role operator --password … | set NAME --disabled true | remove NAME
ufop server acl list | add PRINCIPAL PATTERN PERMISSION | remove ID [--preview] # e.g. acl add alice 'prod-*' run
ufop server whoami
ufop backup hardening Docs [--probe] # ransomware-protection checklist of a server job (exit 0 pass, 1 warnings, 2 failures); --probe tries a delete with the backup credentials
ufop server shutdown [--grace 120] # stop the server gracefully (running backups write a partial version); again = stop now
ufop backup run-all [--job Docs …] [--scheduled-only] [--wait] # the same
| Flag | Default | Description |
|---|---|---|
--ignore-file NAME | .ufopignore | Ignore-file name read in every folder (gitignore syntax; repeatable; replaces the default; "" reads none) |
--respect-gitignore | off | Also .gitignore and .git/info/exclude |
--one-file-system | off | Do not enter folders on another filesystem |
--on-file-error / --on-dir-error | continue | continue (warning) or fail (error) |
--on-unknown-entry | ignore | Sockets, FIFOs, devices: ignore, warn, fail |
--fail-fast | off | Stop at the first error with a partial version |
--max-errors N | none | Stop after more than N read problems |
--rehash-percent N | 0 | 0–100 |
--max-upload SIZE | none | 500M, 20G, … (binary units) |
--parallel-file-threshold SIZE | 256M | 0 = off |
--snapshot-provider | auto | Linux: auto, lvm, zfs, btrfs |
ufop backup stdin takes the repository, retention, --note/--tag and engine flags of ufop backup run. Exit codes follow run: 0 success, 1 warnings, 2 errors or a partial version (fail-fast, error budget, upload limit).
ufop backup restore and reading
Restore as of a time, to an archive, mirror restores, owners, the restore error policy, sparse files, reading one file, the volume cache and serving a version as a drive. See backup-restore.md.
ufop backup restore --dest /mnt/backup --target ~/out --time "2026-10-01 09:00" # local time; also 2026-10-01 or RFC 3339
ufop backup restore --dest /mnt/backup --target ~/out --version oldest # latest | oldest | N | <timestamp>
ufop backup restore --dest /mnt/backup --archive ~/docs.zip [/home/me/Docs] # .zip | .tar | .tar.gz | .tgz
ufop backup restore --dest /mnt/backup --target ~/Docs --mirror [--yes] # also delete what the version lacks
ufop backup restore … --restore-owner always --on-missing-data continue --fail-fast --max-errors 20 --sparse off
ufop backup cat --dest /mnt/backup /home/me/Docs/a.txt [--time …] [--offset 0 --length 4096] > a.txt
ufop backup mount --dest /mnt/backup [--version latest | --time … | --all] [--port 0] # read-only WebDAV until Ctrl-C
ufop backup cache stats|clear [--cache-dir DIR]
| Flag | Default | Description |
|---|---|---|
--version | 0 | A number (0 = newest), latest, oldest, or a version's timestamp / file-list name |
--time | none | The newest complete version made at or before this time (wins over --version) |
--allow-partial | off | latest, oldest and --time may pick interrupted versions |
--archive PATH, --archive-format | none | Write an archive instead of files; format zip, zip-stored, tar or tgz (default: from the name) |
--mirror, --yes | off | Delete extra files in the restored folders of --target; lists them and asks unless --yes (refused without a terminal) |
--restore-owner | auto | auto (when root/administrator), always (fail otherwise), never |
--on-file-error, --on-dir-error, --on-missing-data | fail | fail (error) or continue (warning) |
--on-metadata-error | warn | ignore, warn, fail |
--fail-fast, --max-errors N | off, none | Stop at the first error / after more than N problems |
--sparse | auto | auto leaves holes for zero runs; off writes every byte |
--use-cache, --cache-dir, --cache-size | off, user cache folder, 2G | Read volumes through the local volume cache (cat and mount always use it; --cache-size 0 turns it off) |
ufop backup mount prints the drive's address (http://127.0.0.1:PORT/<token>/) and password. --bind can serve another address; anyone who can reach it and has the token can read the files.
ufop backup verification, templates and schedules
Scoped and sampled verification works on a repository directly. Templates, effective settings and schedule previews use the signed-in ufop-server (ufop server login). See backup-policies-and-schedules.md.
ufop backup verify --dest /mnt/backup --version latest --path '*/Documents/*' --percent 10 --files-percent 5 --parallel 8 --max-errors 20 --json
ufop backup verify --dest /mnt/backup --structure # index and listing only, no downloads
ufop backup template list
ufop backup template create --name Laptops --settings '{"retention":{"type":"keep_days","days":30},"options":{"compression_level":3}}'
ufop backup template create --file laptops.json # a template, or an export holding one
ufop backup template update Laptops --settings '{"schedule":{"enabled":true,"cron":["30 1 * * *"]}}'
ufop backup template apply Laptops --job Docs # the job is based on it too (it wins over earlier ones)
ufop backup template export [--template Laptops] [--out templates.json]
ufop backup template import templates.json
ufop backup template delete Laptops # refused while a job uses it
ufop backup effective Docs # every setting and where it comes from
ufop backup schedule-preview --cron "30 2 * * Mon-Fri" --cron "0 9 * * Sat" --count 5
ufop backup schedule-preview --start-time 02:00 --interval-minutes 1440 --timezone +02:00 # times in that zone and this computer's
--timezone (also "timezone" in a schedule, e.g. template update … --settings '{"schedule":{"enabled":true,"cron":["30 1 * * *"],"timezone":"UTC"}}') takes local (default: the server's or this computer's zone, with daylight saving), UTC, or a fixed offset such as +02:00, -0530 or UTC+1; see backup-policies-and-schedules.md.
Flag (verify) | Default | Description |
|---|---|---|
--version (repeatable) | all | A number (0 = newest), latest, oldest or a version's timestamp |
--path (repeatable) | all | A folder (everything below it) or a wildcard |
--structure | off | Check the index and listing only; nothing is downloaded |
--samples N / --percent N / --full | --samples 3 | Download N volumes / N % of the volumes in scope / every volume, checking every block |
--files-percent N | 0 | Rebuild N % of the scoped files and compare their hashes |
--parallel N | 0 (= 4) | Downloads and file checks at once |
--max-errors N | 0 (no limit) | Stop after N problems |
--use-cache (+ --cache-dir, --cache-size) | off | Read volumes from the local volume cache |
verify exits with 0 when it finds no problems and 2 when it finds some. With --json the full report is printed, including problems with the affected versions and paths.
ufop backup notify-profile
Notification profiles of the signed-in ufop-server: reusable channels jobs and templates refer to. See backup-notifications.md.
ufop backup notify-profile list
ufop backup notify-profile show "On call"
ufop backup notify-profile create --name "On call" --preset pagerduty --min-severity warning --secret-env PD_ROUTING_KEY
ufop backup notify-profile create --name Phone --preset ntfy --server https://ntfy.example.org --topic backups --bearer --secret-env NTFY_TOKEN
ufop backup notify-profile create --name Pushover --preset pushover --user uQiRzpo4DXghDmr9QzzfQu27cmVRsG --secret-env PUSHOVER_TOKEN
ufop backup notify-profile create --file ops-mail.json # {"name": …, "notification": {…}, "min_severity": …}
ufop backup notify-profile update "On call" --min-severity error
ufop backup notify-profile test "On call"
ufop backup notify-profile delete Phone [--force] # --force also removes it from jobs and templates
Flag (create / update) | Description |
|---|---|
--name, --description | Profile name and description |
--notification JSON | The channel ({"type":"email",…}, {"type":"webhook",…}, …) |
--file PATH | A whole profile as JSON (flags win) |
--min-severity success|warning|error|none | Send results at least this severe (none uses the channel's send_on) |
--secret / --secret-env VAR | The channel secret, stored in the server's secure store (prefer --secret-env) |
--preset NAME (create) | pushover, ntfy, discord, pagerduty, gotify or generic, with --server, --topic, --user, --bearer |
ufop backup destinations: request limits and point in time
Every ufop backup command with --dest takes request limits (0 = unlimited) and the listing parallelism for sharded layouts. See backup-destinations.md.
ufop backup run --dest /mnt/nas/backup --source ~/Documents --put-rate 5 --max-concurrent-requests 4 --list-parallelism 8
ufop backup open-at Office --point-in-time 2026-10-01T08:00:00Z [--name "Office before the attack"]
| Flag | Default | Description |
|---|---|---|
--list-rate / --get-rate / --put-rate / --delete-rate | 0 | Most listing / download / upload / delete requests per second |
--max-concurrent-requests | 0 | Most requests in flight at once |
--list-parallelism | 1 | Shard folders listed at once (1–64) |
open-at works with jobs of the signed-in ufop-server whose destination is a versioned S3 bucket. It creates a read-only job that reads the bucket as it was at the given RFC 3339 time and prints its name, id and version count. Restore from it on the server or in the app.
ufop backup bench
Measures this computer with the engine's own code: block compression (stored, deflate 1/6/9, zstd 1/3/6/12/19, bzip2 for ZIP volumes), AES-256-GCM and ChaCha20-Poly1305 seal/open, Argon2id presets, the Fixed and FastCDC chunkers (speed, block count, size distribution and how much of an edited copy of the sample is found again) and SHA-256/SHA-512. Timings are the best of --repeat runs. Nothing is read from or written to a backup.
ufop backup bench # 16 MiB of generated mixed data (seed 1)
ufop backup bench --sample ~/Documents --size 64M # your own data (a file or folder, first 64 MiB)
ufop backup bench --only compression,chunkers --threads 4 --repeat 5
ufop backup bench --kdf-target-ms 2000 --kdf-memory-kib 262144 # Argon2id parameters taking about 2 s
ufop backup bench --print-options # just the recommended `ufop backup run` flags
ufop --json backup bench # the full report as JSON
| Flag | Default | Description |
|---|---|---|
--sample PATH | generated | File or folder to read the sample from (files in name order, links not followed) |
--size | 16M | Bytes to generate, or the most to read from --sample |
--seed | 1 | Generated data and the edited copy used for the deduplication figure |
--repeat | 3 | Runs per measurement; the fastest counts |
--threads | 1 | Workers for compression, encryption and hashing |
--block-size | 100K | Unit for compression/encryption and the base size of the chunker variants |
--only | all | compression, crypto, kdf, chunkers, hashes (comma-separated) |
--kdf-target-ms | 1000 | Target for the suggested Argon2id parameters (0 = no suggestion) |
--kdf-memory-kib | 65536 | Memory for the suggestion (halved, down to 19 MiB, while one pass is already too slow) |
--print-options | Print --block-codec … --compression-level … --chunker fastcdc --block-size … --cipher … --kdf-* |
Compression is ranked by space saved weighed against speed (bzip2 is listed but only usable as a ZIP volume method, --volume-format zip --zip-method bzip2). When the sample barely compresses the suggestion is --compression-level 0. The desktop app runs the same benchmark under Settings → Benchmark (Advanced), capped at 256 MiB.
ufop backup debug
Read-only expert views of a repository. They take the shared repository lock (like a restore) except header and sessions, which read one file each, and never change the destination or the local database.
ufop backup debug header --dest /mnt/backup # repo.json decoded, format, known/unknown features
ufop backup debug volumes --dest /mnt/backup --kind dblock --min-size 10M [--name-prefix b3] [--max-size 60M]
ufop backup debug stats --dest /mnt/backup # count/bytes per kind, blocks, dedup, per-version use
ufop backup debug blocks --dest /mnt/backup --version 0 [--volume NAME] [--hash-prefix ab12] [--details] [--max-blocks 100]
ufop backup debug block --dest /mnt/backup <hash> [--raw|--decompressed] [--out block.bin]
ufop backup debug index --dest /mnt/backup ufop-i….dindex.aes
ufop backup debug fileset --dest /mnt/backup 0 # the decoded dlist of the newest version, with metadata
ufop backup debug sessions --dest /mnt/backup # writer and readers holding the lock
ufop backup debug db ~/.local/share/ufop/cli-backups/x.sqlite # same as `ufop backup db info`
volumes lists every file of the prefix with its kind (dblock, dindex, dlist, header, lock, other), size, shard folder (sharded layout) and the state the local database records. stats reports the raw block bytes, the stored dblock bytes (compression ratio), the deduplication ratio (all versions' logical size / raw block bytes) and, per version, the distinct blocks it references and the bytes only it references. blocks reads the local database; --details (implied by --volume) downloads the volumes involved for each block's stored size and codec. block checks the decoded data against the block hash (exit code 2 on a mismatch); --raw returns the stored, still compressed bytes of a UFOP pack entry. Add --json for machine-readable output. In the desktop app, Maintenance → Inspect (Advanced) shows the header and statistics.
ufop completions and ufop man
Shell completion scripts and man pages generated from the CLI's own command tree (every subcommand, option and fixed value; global options such as --json and --profile on every subcommand).
ufop completions bash > ~/.local/share/bash-completion/completions/ufop
ufop completions zsh > "${fpath[1]}/_ufop" # then: autoload -U compinit && compinit
ufop completions fish > ~/.config/fish/completions/ufop.fish
ufop completions powershell | Out-String | Invoke-Expression # add to $PROFILE
ufop completions elvish > ~/.config/elvish/lib/ufop.elv # then: use ufop
ufop man backup run # one page (roff) on stdout: ufop man backup run | man -l -
ufop man --out ~/.local/share/man/man1 # every page: ufop.1, ufop-backup.1, ufop-backup-run.1, …
ufop-server completions <shell> and ufop-server man [--out DIR] do the same for the server; its pages are in section 8 (ufop-server.8, ufop-server-user-add.8, …) so they do not collide with the ufop server … pages of section 1. The release packages (.deb, .tar.gz, Homebrew formula) install both sets; see release-checklist.md.
ufop verify-release
Checks a downloaded release: the minisign signature of SHA256SUMS with the release key (the app's updater key, built in) and the SHA-256 of every listed file that is in the folder. Exit code 0 when the signature and every present file match, 1 otherwise.
ufop verify-release ~/Downloads/SHA256SUMS # signature: ~/Downloads/SHA256SUMS.minisig
ufop verify-release SHA256SUMS SHA256SUMS.minisig --require-all # every listed file must be present
ufop verify-release SHA256SUMS --pubkey-file other.pub # another key (RW… line, minisign.pub or Tauri's base64 form)
ufop --json verify-release SHA256SUMS # {signature_ok, trusted_comment, files:[{name,status}], ok}
| Flag | Description |
|---|---|
--pubkey KEY / --pubkey-file FILE | Public key (default: the UFOP release key RWQOqigyl5kY9Vj4LeRcZ2DMlAEY85jWjDqOZ94gBgYhSd1TOsJ0nxzZ) |
--dir DIR | Folder with the downloads (default: the folder of SHA256SUMS) |
--require-all | Fail when a listed file is missing |
--signature-only | Check only the signature |
scripts/verify-release.sh does the same with minisign, ufop or OpenSSL 3, and also checks SHA256SUMS.asc with GPG.
ufop server shares
Share links on a ufop-server started with --share-root (sign in first with ufop server login).
ufop server shares create /srv/share/q3 --name "Q3 reports" --expires-in-days 14 --max-downloads 20
ufop server shares create /srv/share/inbox --kind upload --password "$PW" --max-upload-mb 500
ufop server shares list --csv
ufop server shares log <id> -n 100
ufop server shares revoke <id>
create prints the full link once (only its hash is kept). Kinds: download, upload (drop box), both.
Folder policies (inherited by subfolders):
ufop server folders set /srv/share/inbox --allow pdf,docx --intake sequence --max-upload-mb 200
ufop server folders set /srv/share/archive --lock --require-password true --max-link-days 14
ufop server folders show /srv/share/inbox/2026 # own policy, the one in force and its sources
ufop server folders copy /srv/share/inbox /srv/share/hr
ufop server folders clear /srv/share/archive
ufop server folders list
ufop agent
Connect this machine to a UFOP management console, without the desktop app. The console's fleet policies become managed backup jobs here (local-folder destinations only; use ufop-server for cloud destinations), and their results are reported back.
ufop agent register --url https://console.example.com --token ufop_reg_… [--tags lab,linux]
ufop agent claim --url https://console.example.com # shows a code to enter in the console
ufop agent run [--heartbeat 60] # foreground: heartbeats, commands, policies, scheduled jobs
ufop agent sync # one round now (waits for backups the console started)
ufop --json agent status # registration, policies, queued reports, per-job warnings
ufop agent unregister [--force]
ufop agent run runs managed jobs on the same schedules as the desktop app: interval or cron schedules in the schedule's time zone (a slot missed while stopped runs once), compaction, verification and retention on their own maintenance schedules, and settings inherited from the organization's policy templates. See Managed jobs on the standalone CLI agent. Settings live in ~/.config/ufop/agent.json and the token in agent-token next to it (both 0600); central credentials stay in memory.
ufop gateway
An on-premises file gateway: serve folders on this machine through a ufop-server, so the server's users can browse, download and (optionally) upload them. The agent connects out to the server over HTTPS, so no inbound port is opened. Data streams straight through and the server does not store it. Start agents with the same --name on several machines to share the work and fail over.
# On the machine with the files (token: ufop server tokens create gw --scope write)
UFOP_GATEWAY_TOKEN=ufop_pat_… ufop gateway serve --server https://files.example.com \
--name office --root /srv/projects --root /srv/scans [--writable] [--max-upload-mb 500]
# Anywhere, after `ufop server login`
ufop gateway list # gateways and their nodes
ufop gateway ls office /projects # list a folder (/ = the roots)
ufop gateway get office /projects/q3/report.pdf # download (-o to choose the file)
ufop gateway put office ./notes.txt /projects/notes.txt # upload (writable gateways)
Paths are /<root folder name>/…. They stay inside the roots after symlinks are resolved, and dot-files are neither listed nor served. Uploads are written under a hidden temporary name and renamed into place. Ctrl+C stops an agent, which leaves the pool at once.
ufop mcp
Serve file tools to an AI client (Claude Desktop, Claude Code, any MCP client) over the Model Context Protocol on stdio. Every path is confined to the --root directories: paths are resolved and symlinks followed before the check, so .., absolute paths and links pointing outside are refused. Read-only unless --allow-write.
ufop mcp --root ~/Projects/reports # read-only
ufop mcp --root ~/Inbox --root /srv/share --allow-write # several roots, with write tools
Client configuration (e.g. claude_desktop_config.json):
{ "mcpServers": { "ufop": { "command": "ufop", "args": ["mcp", "--root", "/home/me/Projects"], "env": { "UFOP_LOG_FILE": "/home/me/.ufop-mcp.log" } } } }
| Flag | Description |
|---|---|
--root <DIR> | Directory the client may use (repeatable, required). Named after its last component (docs, docs-2, …). |
--allow-write | Also offer write_file, create_directory, copy_file, move, delete |
--max-read-bytes <N> | Largest read per call (default 4 MiB) |
For remote clients, ufop-server --mcp-root <DIR> serves the same tools over HTTP at /mcp with OAuth sign-in (see MCP over HTTP in the API reference).
Tools: list_roots, list_directory (optionally recursive; symlinks listed, not followed), get_file_info, read_text_file (byte ranges; encoding: base64 for binary), search_files (glob on names), checksum (sha256/sha1/md5); with --allow-write: write_file (atomic; overwrite to replace), create_directory, copy_file, move, delete (recursive for non-empty directories; roots and symlinks cannot be deleted or written through). Paths are <root>:relative/path, absolute inside a root, or relative to the first root. Tool annotations mark read-only and destructive tools. Each call is logged (tool, arguments, outcome) to the log (--log-file / UFOP_LOG_FILE); stdout carries only protocol messages.
ufop status
Show server and platform status.
ufop status
ufop status --json
Displays:
- Server connectivity status
- Platform information
- Client version
- Active transfers count
- Active sync pairs count
Environment Variables
| Variable | Description |
|---|---|
UFOP_API_URL | Default API server URL |
RUST_LOG | Logging level (overrides -v flags). Example: RUST_LOG=debug |
Scripting Examples
Backup Script
#!/bin/bash
# Daily backup script
DATE=$(date +%Y-%m-%d)
ufop archive create "/backups/backup-$DATE.tar.gz" /data --format tar.gz
ufop transfer "/backups/backup-$DATE.tar.gz" s3://my-bucket/backups/ --verify
echo "Backup completed: $DATE"
Sync All Pairs
#!/bin/bash
# Run all sync pairs
for pair in $(ufop sync list --json | jq -r '.[].name'); do
echo "Syncing: $pair"
ufop sync run "$pair"
done
Find and Report Duplicates
#!/bin/bash
# Report duplicates as JSON
ufop duplicates /shared/drive --min-size 1048576 --json > duplicates-report.json
echo "Found $(cat duplicates-report.json | jq length) duplicate groups"