Skip to content

Releases

v0.5.0 — incremental transfer

Choose a tag to compare

@phaus phaus released this 12 Nov 20:08

Incremental transfer

Unchanged data is no longer re-transferred. After a successful push the
client stores a cache file (/var/db/kopia-darwin-ppc, override with
KOPIA_CACHE_DIR) recording per directory: file name/size/mtime/object-id
plus each directory object id and the SHA-256 of its JSON.

Next run:

  • files with unchanged size + mtime are not read, chunked or uploaded —
    the previous content-addressed object id is reused
  • directories whose rebuilt JSON hashes identically reuse the previous
    directory object id — unchanged subtrees are skipped entirely

A run therefore costs walk time + changed data. Measured on the G4 for the
production source (96,459 files / 586 MB): v0.4 full push 1 h 14–29 min;
with the v0.5 cache an unchanged tree transfers nothing but the walk.
No local index database; the cache is
written atomically after success. Missing, corrupt or foreign-identity
caches (different server/user/hostname/source) fall back to a full push.

After deleting all snapshots of a source or recreating the repository,
delete the client's cache directory once — otherwise the next push may
reference objects that no longer exist.

Fixed along the way

  • sha256() in kopia_sha256.c was an empty stub since the server does
    all content hashing — the cache is its first real user. Implemented
    SHA-256 + HMAC-SHA256, verified against FIPS 180-4 / RFC 4231 vectors.
  • HPACK: huffman-decoded header strings were not NUL-terminated; the
    dynamic-table bookkeeping read past the allocation (found by ASan).
  • The walker now walks the resolved source path, so ignore rules and cache
    keys stay correct when the source path contains symlinks
    (/tmp → /private/tmp on macOS).

Binaries

  • kopia-darwin-ppc — Mach-O ppc_7400 (G4), statically linked mbedTLS 2.28
  • kopia-darwin-ppc64 — Mach-O ppc64 (G5), untested

Verified in production on the G4: second push of an unchanged tree
produces the identical object id with diag: reused 2 files, 2 dirs;
a changed tree reuses exactly the untouched entries.

v0.4.0 — ignore rules + password-file

Choose a tag to compare

@phaus phaus released this 12 Nov 15:17

Ignore rules

kopia-push now supports gitignore-style ignore lists with kopia-compatible
semantics (documented subset):

  • bare names (*.log, node_modules) match at any depth, files and dirs
  • patterns with separators (Library/Caches) anchor to the source root
  • trailing / = directories only; ! re-includes (last match wins)
  • ** as a whole segment spans any number of directories

Rules come from --ignore flags, --ignore-file files and a default
.kopiaignore in the source root. Matched directories are pruned, so
rules also shorten the run — on the G4 the walk dominates wall time.

--password-file (and KOPIA_PASSWORD)

The password can now come from a file (--password-file) or the environment
(KOPIA_PASSWORD), so wrappers no longer need to pass it on the command
line — where it was visible in ps output while a run was active.

Tests

  • tests/ignore-match-test.c — 60+ matcher assertions (anchoring, dir-only,
    negation, **, oversized patterns, CRLF/ comment handling)
  • tests/ignore-roundtrip.sh — server round-trip: all three rule sources at
    once, directory pruning, negation, exact ignored-counts in the run log

Binaries

  • kopia-darwin-ppc — Mach-O ppc_7400 (G4), statically linked mbedTLS 2.28
  • kopia-darwin-ppc64 — Mach-O ppc64 (G5), untested (no G5 in the fleet)

SHA-256 in SHA256SUMS. Verified in production on the G4 (rc=0; with the
ignore rules active the source pushes 96,459 files / 586 MB per run).

v0.3.0 — symlink support

Choose a tag to compare

@phaus phaus released this 12 Nov 09:59
b0dc723

Symlinks are now backed up, matching kopia's dir-manifest format: entries of type "s" whose object holds the link target string — dangling links included.

Changes since v0.2.0

  • Symlink support: readlink → target uploaded as file object, lstat size/mode/mtime. Dynamic target buffer (sized from lstat st_size, retry if the link changes) — no truncation.
  • Special files (FIFOs/sockets/devices): still skipped (kopia does the same), but now logged with path and counted in the run summary.
  • Directory summary fixes: summary.dirs self-count per kopia convention; symlinks counter added to dir summaries and rootEntry.summ.
  • Bug fix: symlink mtime via lstat — previously a dangling symlink produced an empty mtime and broke kopia-side JSON parsing of the dir object.
  • Test: tests/symlink-roundtrip.sh — scripted end-to-end test vs a local kopia server (valid/absolute/dangling/relative/dir/2000-char/UTF-8-dir symlinks, empty + multi-chunk files, FIFO-skip assertion, full restore check).

Verification

  • Round-trip test vs kopia 0.23.1: Restored 5 files, 5 directories and 7 symbolic links — all targets byte-exact
  • Full-tree run against the production server from a PowerPC G4 (Mac mini, 10.5.8)
  • User-Agent: kopia-darwin-ppc/0.3

Binaries

  • kopia-darwin-ppc — Mach-O ppc_7400, Mac OS X 10.4/10.5 G4/G5 (32-bit)
  • kopia-darwin-ppc64 — Mach-O ppc64, G5 (untested — no hardware)

SHA-256 in SHA256SUMS.

v0.2.0 — resilient uploads, recursive dir summary

Choose a tag to compare

@phaus phaus released this 12 Nov 02:55

First release with a battle-tested full-tree backup run from a PowerPC G4 (Mac mini, 10.5.8, 2 h 44 min walk, 199,876 files / 1.2 GB).

Changes since v0.1.0

  • Reconnect + retry on transport loss: a dropped TCP/TLS connection no longer aborts the backup. The gRPC session is re-established transparently and the idempotent WriteContent re-sent (up to 3 attempts; flush/put_manifest retry once).
  • Skip-on-error walker: unreadable files/subdirs are logged (diag: skipping …) and omitted — the walk continues instead of unwinding the whole tree.
  • Recursive directory summary: source size/files/dirs are aggregated up the tree, so the kopia server UI shows the real data size instead of only direct root children.
  • Diag output for previously silent failures (fopen, final chunk flush).
  • Empty files upload and restore correctly.
  • Added missing src/hpack_huffman.h to the repo.

Verification (kopia 0.23.1 server)

  • Full-tree push from a PowerPC G4: /Users/philipp → 1.2 GB, 199,876 files, 49,512 dirs
  • kopia restore byte-identical, incl. empty files
  • Trace logging off by default (KOPIA_TRACE=1 enables)

Binaries

  • kopia-darwin-ppc — Mach-O ppc_7400, Mac OS X 10.4/10.5 G4/G5 (32-bit)
  • kopia-darwin-ppc64 — Mach-O ppc64, G5 (untested — no hardware)

SHA-256 in SHA256SUMS.

v0.1.0

Choose a tag to compare

@phaus phaus released this 10 Nov 09:39

kopia-darwin-ppc v0.1.0

First release. A native kopia repository-server backup client for old PowerPC Macs
(Mac OS X 10.4/10.5, G4/G5) — thin C99 client over TLS + HTTP/2 + gRPC with a
statically linked mbedTLS 2.28. Also includes a minimal local CAS backup backend.

Binaries

Asset Target Runs on
kopia-darwin-ppc-v0.1.0-ppc32 Mach-O ppc_7400 PowerPC G4/G5, Mac OS X 10.5 Leopard (tested on 10.5.8 Mac mini)
kopia-darwin-ppc-v0.1.0-ppc64 Mach-O ppc64 PowerPC G5 only (not tested — no G5 available)
SHA256SUMS — checksums

Static except Leopard system libs (libSystem.B.dylib, libz.1.dylib, libgcc_s.1.dylib).
No MacPorts / no LegacySupport / no runtime TLS libraries needed.

Verify

shasum -a 256 -c SHA256SUMS

Usage

chmod +x kopia-darwin-ppc-v0.1.0-ppc32
./kopia-darwin-ppc-v0.1.0-ppc32 kopia-push \
  --url https://kopia.example.com:51515 \
  --user root --hostname my-g4 --password SECRET \
  --fingerprint XX:XX:…:XX \
  /path/to/backup

Requires a kopia repository server (tested with kopia 0.23.1); server-side setup
(user, ACLs) is described in the README.

Notes

  • Built from commit ea48b22 with osxcross (oppc32-gcc / oppc64-gcc, Mac OS X 10.5 SDK) and
    mbedTLS 2.28.10 (static, per arch)
  • The ppc64 binary links libgcc_s_ppc64.1.dylib — present on 10.5 G5 systems
  • Known limitation: no incremental transfer — every run re-reads/re-sends files
    (server-side dedup avoids duplicate storage)