backdown

CLI reference

Every backdown command and option, generated from the program's own help.

On this page

Everything below comes from the backdown program itself (backdown --help), so it matches what it accepts: version 1.0.0-beta.5.

Run backdown help <command> for the same text in a terminal.

backdown [OPTIONS] <COMMAND>

Commands

CommandWhat it does
indexIndex every file under each PATH as a new scan (read-only; re-run to update).
forgetRemove an indexed drive or folder from the index: its files, folders, scans and what was recognised on it (signed manifests and the chain of custody stay). Nothing on it is touched.
hashHash only what could be a duplicate: size, then a sample, then full SHA-256.
dupesList duplicated content, largest reclaimable space first (runs hash first).
checkIs PATH safe to wipe? Every file needs a SHA-256-identical copy outside PATH (runs hash first). Exits 0 when safe, 2 when files must be copied first.
import-legacyImport the index the pre-Rust scripts wrote (bd-index.sh, bd-hash.py), so their crawling and hashing aren't repeated.
volumesEvery disk and partition on this machine: what's on it, and what BackDown can do with it (read-only; needs no root).
healthHow each drive is doing: SMART verdict, temperature, bad sectors, wear, and what changed since its first reading (read now, without root; kept in the index). Exits 2 when a connected drive is failing.
mountMount a partition read-only (one backdown volumes calls mountable), or attach a disk image read-only and mount what's on it; never read-write, and as you: udisks on Linux, diskutil and hdiutil on macOS (Windows attaches ISO, VHD and VHDX images). Without a target, lists what BackDown has mounted.
unmountUnmount a partition, or detach a disk image, that BackDown mounted (nothing else).
scansFinished scans, oldest first.
serveBrowse the index in your web browser: folders at any scan, versions, copies, file viewers.
statusWhat's in the index (and what the daemon is doing).
daemonRun in the background: rescan drives, hash, serve the web UI. Usually started by backdown service install rather than by hand.
openOpen the running daemon's web UI in your browser.
tokenThe background service's browser token, for opening BackDown from a browser yourself (in a terminal, also the links with it in, including the one for other devices with --host).
completionsTab completion for backdown's commands and options: print the script for a shell, or --install it for yours.
appOpen BackDown in a window of its own, starting its background service first if need be (what the applications menu, Start menu and BackDown.app run).
desktopAdd BackDown to your applications menu, ~/Applications or the Start menu (or remove it).
updateIs there a newer BackDown? Install it (verified against the release's signature and SHA-256 sums), from the network or from a folder carried over.
serviceRun the daemon as a service (systemd on Linux, a login item on macOS, a task at logon on Windows): install, uninstall or check it.
entitiesWhat things are: mail stores, backups, phones, systems, repositories, libraries… with where they came from (reads small files like backup scripts on connected drives).
peopleWho the things are about: everyone with a mailbox, a Nextcloud account, a home folder or a mail identity on any drive, with everything found of them.
databasesThe databases behind the dumps, data directories and sites on every drive: each one with every dump and live copy of it, and what used it.
searchSearch inside things: mail by subject, sender and recipient; database dumps and SQLite files by table, column and, at full depth, the text in their rows. Reuses Dovecot's own index for mail headers and SQLite's full-text tables in place.
overlapsHow much of each drive, folder and recognised thing already exists elsewhere, and where.
reportThe whole picture as a document: drives, what's on them, overlaps, duplicates, and which drives are safe to wipe.
planPropose where everything on the old drives goes in one archive, and why (saved, so it can be applied).
plansPlans made so far.
applyApply a plan: show what it would do, or with --go copy, verify and journal every file (never deletes anything).
rescueGet files back from a failing, formatted or emptied drive or card (only reads it).
mirrorKeep a folder (usually part of the archive) copied on another drive, and check the copy now and then.
wipeFree drives (or folders on them): delete only what has a verified copy elsewhere, moving what exists only here to --move-to first. Without --go, only shows what would happen.
licenseYour BackDown Pro licence: add a key, or show the one you have.
remoteOther machines (a NAS, another computer) whose BackDown index is read over ssh, so copies there count for duplicates and wiping.
poolThe pool: folders on the swarm's drives that drives are filed into, each file once. On the machine whose drive it's on: pool add FOLDER; pool list shows every machine's.
swarmEvery machine as one: each machine's drives, how full they are and what's indexed on them (this machine and the ones backdown remote reaches); swarm where NAME finds files on all.
dedupTidy an archive: identical files in FOLDER share their storage, as hardlinks or clones. Both files are re-read first; every link is journaled. Without --go, only shows what would happen.
mailMailboxes: merge copies of one into a single Maildir, or export a Maildir folder as mbox.
custodyThe chain of custody: every copy, move, deletion, link and merge BackDown made, in a hash-chained log sealed with this installation's key. Export it as a signed bundle, verify one, or check the log in the index.
manifestSigned, tamper-evident manifests of what a drive held at a scan: sign one, check one (anyone can, here or on another computer), list the ones kept, show your signing key.

Global options

Every command takes these.

--db <DB>
Index database (default: your BackDown data folder; see backdown status). Also read from $BACKDOWN_DB.
--local
Work on the index directly even if a BackDown daemon is running.
-h, --help
Print help (--help shows more than -h).
-V, --version
Print the version.

When the daemon is running

When the daemon is running, it owns the index: index, hash, dupes, check, scans, status, health, remote sync and apply --go are handed to it and you follow its progress in the terminal; wipe, dedup --go and mail merge check first, then hand the work to it. Everything else reads the index directly. --local makes any command work on the index itself instead. import-legacy refuses to write while a daemon is running: stop it first. On Windows, commands always use the index directly.

Exit codes

CodeMeaning
0Done. For check: safe to wipe.
1Something went wrong; the message says what. license show: no licence. In a release version, a Pro command without a licence.
2Finished, with a result to act on: check found files that exist nowhere else (or couldn't be read); apply, wipe, mirror sync, mirror verify, dedup or mail merge had conflicts, failures or mismatches; health found a connected drive failing; rescue image couldn't read everything; rescue find or rescue partitions found nothing.
3service status: the service isn't running.
10update --check: there's a newer version.

Environment

BACKDOWN_DB
The index database, like --db.
BACKDOWN_PORT
The daemon's port for the browser, like backdown daemon --port.
BACKDOWN_BROWSER
The Chromium-family browser backdown app uses, like --browser.
BACKDOWN_NO_UPDATE_CHECK
When set, the daemon never looks for updates, whatever Settings says.
XDG_DATA_HOME, XDG_RUNTIME_DIR (Linux)
Where the data folder and the daemon's socket go: $XDG_DATA_HOME/backdown (default ~/.local/share/backdown) and $XDG_RUNTIME_DIR/backdown.
LOCALAPPDATA (Windows)
The data folder is %LOCALAPPDATA%\BackDown.

Last updated · What's released, and what's next