Command line
The pabaru command does everything the app does and is easy to script. Run
pabaru --help or pabaru <command> --help for the full list of options.
| Command | What it does |
|---|---|
pabaru encode |
Back up files and folders into a PDF or PNG pages for printing. |
pabaru decode |
Restore files from scanned pages (PNG, JPEG, TIFF, BMP, PDF). |
pabaru inspect |
Show information about one scanned page and a block quality map. |
pabaru verify |
Test a backup without a printer: simulated print, scan and restore. |
pabaru plan |
Propose layouts (page count, dot density, resilience) for your data. |
encode
Section titled “encode”# Back up to a PDF (A4, laser 600 dpi, 200 dpi dots, 20 % parity)pabaru encode ./photos ./documents -o backup.pdf
# More resilient: survives losing a whole page, encrypted with a passwordpabaru encode ./documents -o backup.pdf --survive-page-loss --encrypt
# Pages as PNG images (e.g. to print them yourself)pabaru encode ./documents -o ./pages
# Let the optimizer choose the parameters for a profilepabaru encode ./documents -o backup.pdf --profile archival --printer laser600 --scanner-dpi 600The output is a PDF if -o ends in .pdf, otherwise a folder of PNG pages.
| Option | Meaning |
|---|---|
--profile compact|balanced|archival |
Use the optimizer’s proposal (profiles); overrides the manual options below. |
--printer laser600|laser1200|inkjet |
Printer type (for --profile). |
--scanner-dpi N |
Optical resolution of the scanner you will restore with (default 600). |
--paper a4|letter|WxH |
Paper size; custom size in millimetres, e.g. 210x297. |
--margin MM |
Paper margin in millimetres (default 10). |
--printer-dpi N |
Physical printer resolution for manual settings (default 600). |
--dot-dpi N |
Dot density; must divide the printer resolution (default 200). |
--fill PCT |
Dot size in % of the pitch (default 70). |
--redundancy PCT |
Minimum parity in % of the data blocks (default 20). |
--survive-page-loss |
Guarantee recovery after losing any one page. |
--encrypt |
Encrypt; you are asked for the password twice. |
--password-env VAR |
Read the password from an environment variable (for scripts; enables encryption). |
--name TEXT |
Optional label stored on paper. Input names are never stored. |
--level N |
zstd compression level 1–22 (default 19). |
decode
Section titled “decode”# Restore from scans — the order of the files does not matterpabaru decode scan*.png -o ./restored
# Without -o: restore into the folder of the first scanpabaru decode scan*.png
# Straight from a scanner's PDFpabaru decode scan.pdf -o ./restoredEncrypted backups are detected automatically and you are prompted for the password (three
attempts without reloading the scans). In scripts, use --password-env VAR.
inspect
Section titled “inspect”# Check a single scan: page info and a map of block qualitypabaru inspect scan1.pngUseful to find out whether a page needs rescanning before you start a restore.
verify
Section titled “verify”# Simulated print and scan, then restore and compare hashes — plus losing page 1pabaru verify ./documents --survive-page-loss --drop-page 1
# Simulate crumpled and torn paperpabaru verify ./documents --profile balanced --crumple medium --tearverify accepts the same options as encode, plus the simulated damage:
--angle DEG (rotation, default 1.5), --blur PX, --noise N, --scale R (scan vs. print
resolution), --drop-page N (repeatable), --crumple medium|strong and --tear.
pabaru plan ./documents --printer laser600 --scanner-dpi 600 --paper a4pabaru plan ./documents --json # machine-readableplan packs the data and, for each of the profiles Compact, Balanced and Archival,
computes the number of pages, dot density, minimum scan resolution and resilience. Add
--encrypt to account for the few bytes encryption adds.
Output language
Section titled “Output language”The CLI speaks English. (The desktop app is available in English and Czech and follows the
system language; override it with PABARU_LANG=en or PABARU_LANG=cs.)