backdown

backdown import-legacy

Import the index the pre-Rust scripts wrote (bd-index.sh, bd-hash.py), so their crawling and hashing aren't repeated.

On this page
backdown import-legacy [OPTIONS] <INDEX_DIR>

Arguments

<INDEX_DIR>
The scripts' index folder.

Options

--hashes <HASHES_DB>
bd-hash.py's hashes.db: attach its SHA-256s to the files they belong to.
--map <LEGACY=NOW>
A drive mounted somewhere else now: LEGACY_PATH=PATH_NOW (repeatable; a legacy folder maps everything below it).
--volume <NAME>
Import only this volume, a folder name in INDEX_DIR (repeatable; default: all).
--replace
Replace what the index already holds for a root, or for roots nested with it.
--dry-run
Read everything and show what would be imported, writing nothing.

Also takes the global options --db and --local.

Details

The legacy index is the `index` folder the pre-Rust scripts wrote:

  <vol>/chunks.list      bd-plan.py's crawl plan, one `R<TAB>dir` or `F<TAB>dir` per line;
                         its first line, `F<TAB>/mount/point`, names the drive's root
  <vol>/chunks/<id>.tsv  one chunk, from `find -printf '%s\t%T@\t%p\n'`: size, mtime
                         (seconds.fraction) and the raw path; <id>.done marks it finished
  <vol>.tsv              every finished chunk, merged (read when present and up to date)
  hashes.db              bd-hash.py's table h(path, size, mtime, sha256)

Each volume becomes a root with one finished scan, dated from its chunks. Chunks that never
finished are left out and counted; the next `backdown index` adds their files. A hash attaches
where the path, size and mtime (to the second) still match. Safe to run again: an interrupted
import resumes, a finished one is left alone. Stop the daemon while importing.

Afterwards `dupes` and `check` work straight away, and `backdown index <root>` with the drive
mounted finds its files unchanged and keeps their hashes.

Examples:
  backdown import-legacy ~/scripts/index --hashes ~/scripts/index/hashes.db --dry-run
  backdown import-legacy ~/scripts/index --hashes ~/scripts/index/hashes.db \
      --map /media/olduser/Photos=/mnt/photos

See also

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