CLI plugin that adds brkraw backup for scanning and archiving Bruker ParaVision datasets.
Install the plugin:
pip install -U git+ssh://git@github.com/BrkRaw/brkraw-backup.gitInitialize paths in ~/.brkraw/config.yaml:
brkraw backup init /path/to/raw_dir /path/to/archive_dirScan and view status:
brkraw backup scan
brkraw backup infoNotes:
- Archives are stored under
backup.archiveas zip files. - A JSON registry is written under the archive directory (default:
.brkraw-backup-registry.json). - If
backup.rawdata/backup.archiveare configured, most commands can omit positional paths. - Progress bars show only on TTY; disable with
--no-progress. - Detailed
ISSUES:sub-lines show only when log level isDEBUG.
Register raw/archive directories in brkraw config.
brkraw backup init /raw /archive
brkraw backup init /raw /archive --forceWrites:
backup.rawdata: /rawbackup.archive: /archive
Scan rawdata + archive and update the registry.
brkraw backup scan
brkraw backup scan /raw /archiveShow the last recorded status from the JSON registry (no filesystem scan).
brkraw backup info
brkraw backup info /archive
brkraw backup info --status OK,ARCHIVED
brkraw backup info --status TODO
brkraw backup info --integ FAIL,WARN
brkraw backup info --exclude-status UNKNOWNScan and show only non-OK datasets.
brkraw backup reviewCreate/update archives for datasets that are missing a backup or mismatched.
brkraw backup run
brkraw backup run --only A,B,C
brkraw backup run --dry-run
brkraw backup run --rebuild
brkraw backup run --delete-raw --yesUpdate behavior:
- Default: append missing files into existing zip (no full rebuild).
--rebuild: recreate the zip from scratch.
Import legacy .brk-backup_cache into the new JSON registry.
brkraw backup migrate /raw /archive
brkraw backup migrate /raw /archive --old-cache /archive/.brk-backup_cache
brkraw backup migrate /raw /archive --no-scanShow plugin + environment info (useful for debugging installs).
brkraw backup aboutDeep integrity scanning compares:
- raw file list vs zip file list
- raw total bytes vs zip uncompressed bytes (
ZipInfo.file_sizesum)
This is optional because it can be slow on large datasets / network storage.
Options (available on scan and run):
--integrity off|new|all(default:off)off: skip deep checksnew: check only datasets that need a check (based onlast_backupvsintegrity.checked_at)all: check all raw+archive pairs (subject to limit)
--integrity-limit N(default:0)0: no limitN: check at most N datasets per command invocation
The status table includes an INTEG column:
-: not checkedOK: file list + byte totals matchWARN: file list OK but byte totals differFAIL: missing files found in archiveSKIP: archive is not a zip (cannot compare file lists / bytes)