Skip to content

Releases

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 19 Nov 12:54
v0.5.0
70d8485

Added

  • radicle-backup is now also a Rust library, so other programs can read and write rad backup archives. With default-features = false it has no command line, no SQLite and no file system access, and it builds for WebAssembly. tests/fixtures holds sample archives that another implementation can test against.

Fixed

  • restore now waits up to a minute for each node it asks when it compares your repositories with the network. It used to give up after 9 seconds, so a large repository could show as "could not be compared".
  • restore --force over a node that crashed or was killed could restore damaged databases, because of files the crashed node left behind. It now restores them exactly as archived.
  • --identity now takes an age key file as age-keygen writes it, with its # comment lines.
  • doctor now fails a passphrase archive whose encryption header cannot be read. It used to call it fine.

Security

  • verify and restore now refuse an archive with clashing or oddly spelled file names, such as ./a/b beside a/b, names that differ only in case, or NUL. Such an archive could pass verify --deep and then restore different files from the ones it checked.
  • verify and restore now refuse an archive that holds anything but plain files. A crafted tar header of a few kilobytes could make them use hundreds of megabytes of memory.

Full Changelog: v0.4.2...v0.5.0

v0.4.2

Choose a tag to compare

@github-actions github-actions released this 06 Nov 15:19
v0.4.2
5d62d8a

Fixed

  • restore --words now also sets your node's alias, so rad node start works right after it. It asks for the alias printed on your recovery sheet. It used to restore only the key, and rad could not start a node from that home.
  • A passphrase-protected archive written on a much faster machine now opens on a slow one. age makes a passphrase cost about a second to check on the machine that wrote the archive, so a slower machine takes longer. rad backup first says how long the check will take and how much memory it needs. It used to refuse, and said the right passphrase was wrong.
  • move now reminds you to set up timed backups again on the other machine, and to turn off the timer on this one. The archive does not carry the timer, so the other machine took no backups and nothing said so. schedule --off now also works after move retired the key on this machine.
  • Several small restore fixes:
    • When rebuilding a repository's issue or patch list fails, restore now prints the exact command to retry it.
    • The commands restore and restore.sh print to run by hand now work when the Radicle home's path holds a '.
    • A restore stopped while it rebuilds the issue and patch lists still records which archive it came from, so doctor and diff know.
    • The messages restore.sh prints no longer garble a path that holds a backslash.
    • restore --replay-policies now works when your Radicle cannot read the archived policy database, which is what the flag is for. It used to copy that database in anyway, which could break the replay.
  • A damaged archive is now named in the error that reports the damage. verify and restore used to print only a bare message such as "Data corruption detected".

Security

  • The zstd library that compresses and reads archives is updated to a release that fixes several memory-safety advisories. As far as the advisories describe them, none reach the way rad backup uses zstd.

Full Changelog: v0.4.1...v0.4.2

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 16 Oct 06:40
v0.4.1
6f486cc

Fixed

  • A restored home now automatically lists its issues and patches. rad issue list and rad patch list used to show nothing after a restore, until their cache was rebuilt by manually running rad cob migrate, then rad issue cache --repo <rid> and rad patch cache --repo <rid> for each repository.
  • ls, show, verify and prune now say when the directory they look in for archives does not exist, such as one your last archive went to that has since been moved. They used to say it held no archive. prune now exits 4 there. It used to exit 0.

Full Changelog: v0.4.0...v0.4.1

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 14 Sep 06:23
v0.4.0
ad39dbe

Upgrading

  • If you already used rad backup schedule, run it again with the same flags, then take a backup. The timer it set up may not have found rad. Its backups then left out your private repositories, and with --keep they may have deleted the older archives that still had them.
  • If a script matches text in doctor, verify or restore --json output, change it. For doctor and verify, match each check on its new checkId instead. The doctor checks once called delegate quorum, other seeds and signed refs propagation have the ids sole-delegate, public-repositories and unshared-work. For restore, read the atRisk, ahead and notChecked lists.

Added

  • doctor --json and verify --json now give each check an id that stays the same when the wording changes. It is called checkId. restore --json gives each repository one too, called standingId.

Changed

  • Output across commands is reworded into plainer, more immediately understandable sentences. The summary after a backup labels each line.
  • doctor shows a check as skipped when there is nothing to check yet, such as before your first backup. It used to count those as "could not be checked". --json has a new skipped verdict and count.
  • doctor warns that you are the only delegate of a repository only when rad-backup knows of no backup of your key.
  • A backup with the node running no longer shows a warning. It notes that a repository syncing during the backup may be saved slightly behind.

Fixed

  • A backup of private repositories that cannot find rad now exits 3. Without rad it cannot tell which repositories are private, so it saves none of them. It used to exit 0, so a scheduled run looked successful.
  • --keep and prune no longer delete your last complete archive when the newer ones are missing repositories.
  • Commands that look for your archives now skip a file that is only named like one, such as a renamed copy. prune and --keep used to delete such a file first.
  • A timer set up by rad backup schedule now finds rad, even in ~/.radicle/bin. A timer does not see your shell's PATH, so schedule now saves where rad is. When schedule cannot find rad, it sets up no timer.
  • schedule now refuses a path that systemd would misread, such as one with a backslash or a line break. The crontab line it prints for a machine without systemd now works when a path contains %.
  • When restore could not compare a repository, it now tells you to clone it into a new, empty RAD_HOME before you write. It used to suggest rad sync --fetch, which cannot show that another node has newer work of yours.
  • restore now says to stop the old machine's node, if it still runs, before you start the node on the new machine. It used to talk about "the other" node as if one were running.
  • restore --no-reconcile no longer warns that repositories could not be compared. You turned the comparison off, so there is nothing to warn about.
  • diff now compares which repositories you seed and block, and which peers you follow and block. It used to compare only how many, so swapping one for another showed no change. This starts after your next backup or restore. diff --json lists the changes in a new policies field, which is null until then.
  • diff no longer lists a new repository twice.
  • verify --deep now shows a failed line for the archived repositories when any of them could not be opened or was empty. It used to show a passed line beside those problems, or no line at all.
  • doctor and other commands no longer warn about a helper file next to the node's database. SQLite creates that file, and it is harmless.
  • Several doctor findings are corrected. It no longer warns about a recent backup sent to standard output, or claims a machine was never restored. It now says when your node holds no public repositories. When your private repositories are in a different archive from the one it found, it names that archive. On a first run it suggests a full path for --output.
  • A backup no longer prints the same warning twice, or says the node is running when it could not tell.
  • show now lists an archive's old warnings under "noted when this archive was taken". They used to look like current warnings.
  • In a script, prune, rad backup move and restore --words now tell you which flag to add when they cannot ask you. They used to give advice that did not fit, such as dropping a --dry-run you had not passed.
  • An empty passphrase no longer suggests --plaintext. That flag only matters when you create an archive.
  • When RAD is set to a program that cannot be run, commands now say so. They used to say rad was not on PATH.

Full Changelog: v0.3.0...v0.4.0

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 11 Sep 16:11
v0.3.0
4153f56

Added

  • doctor now opens the newest archive with the --identity key on hand and says whether it still opens. An archive encrypted to a key nobody has any more was reported as a working backup. One sealed with a passphrase is judged from its header and never opened, because a health check that prompts is one people stop running.
  • --identity-passphrase-file, RAD_BACKUP_IDENTITY_PASSPHRASE_FILE and RAD_BACKUP_IDENTITY_PASSPHRASE, so an unattended run can open an archive encrypted to an ssh key that has a passphrase on it. It is a different secret from the archive's own passphrase, and --help says which is which.
  • A --recipient run now names the key the archive will need to be opened. Until now only the note beside the archive said so, and that note is read in the middle of a recovery.

Changed

  • restore now asks other nodes what they hold of your signed refs, instead of reading back the refs it had just written. Every restore used to report every repository "in step with the network", which is the one answer that means safe to write, because a fetch over a repository already in storage ignores your own key: the archive was being compared with itself. It now fetches, waits twenty seconds for other nodes to answer, and reports another node holds signed refs this copy does not have at exit 3.

  • A restore that meant to compare and could not, now exits 3 instead of 0. No rad on PATH, a node that would not start and a fetch that did not work all leave the fork hazard unexamined, and a scheduled restore reporting success over that was the last anyone heard of it. The home is fully restored either way: 3 says the fork check did not run, not that anything is missing. --no-reconcile still exits 0, because a check you declined is not a check that failed.

  • restore's verdicts and --json fields changed with that comparison, so anything matching on them needs updating:

    Was Is now
    in step with the network no other node has reported holding anything else
    diverged from the network another node holds signed refs this copy does not have
    holds work the network has not seen holds work no node that answered has, or holds work no node had when the archive was taken
    the network was ahead, and has been taken gone: a pull cannot establish it
    not checked could not be compared, or nothing to compare it with
    "diverged", the list "atRisk"
    "notChecked", a count "notChecked", the list of repositories it used to count
    new: "ahead", "aheadOfAStaleRecord", "nothingToCompare"
  • restore now compares repositories it used to skip: any repository you first wrote in after the backup was taken, and a private one another delegate or an allowed peer can hold. Only a repository announced to nobody, delegated to you alone and allowed to nobody is left uncompared. The report names up to five of those and --json carries them all.

  • doctor exits 3 when every check came back "could not be checked", instead of 0. A run with no rad, no readable node database and no archive to open established nothing, and the exit code a monitoring probe reads called that clean. A report mixing "could not be checked" with real answers still exits 0.

  • doctor --backup-dir is now doctor --dir, matching ls and prune, and the checks look in it rather than only naming it in a remedy. --backup-dir keeps working and is not going away.

  • rad backup man at a terminal now exits 1 with the ways to read the manual, instead of printing the man page file's markup, which is unreadable there. Redirected to a file or a pipe, it still prints the page.

  • --help now puts the options that work with every command, such as --home and --json, under a heading of their own, Global options.

Fixed

  • A restore into a home that holds repositories but no key now refuses (exit 4) instead of going ahead. A home counted as empty when its key had been retired by an earlier move, deleted, or merely could not be read, and the restore then rewound every repository's refs, other peers' namespaces included. --force still overwrites, and names what it is about to write over.
  • A home whose keys directory could not be listed all the way through is no longer read as one holding no key an earlier move retired, which is the answer that let a restore go ahead over somebody's displaced key.
  • restore no longer says your peer history has forked because git could not answer. An object git cannot read produced the same verdict as a real divergence, which is the most alarming thing this tool says. Such a repository is reported as uncompared now, and a comparison that fails no longer costs the list of which repositories did not come back at all.
  • A passphrase-protected ssh key now opens an archive encrypted to it. No prompt appeared and the run said the key did not open the archive, which is false and is the worst thing to tell somebody mid-recovery. A key of a type age does not support, such as an ecdsa key sitting next to the right ed25519 one, is now named and skipped rather than ending the run.
  • Whether a node is running is answered from the socket rad itself would use, and a socket that could not be asked is no longer read as a stopped node. RAD_SOCKET was ignored, so a node started under it was invisible, and a permission error answered "stopped" about a node that was up. restore and move refuse rather than guess, and a backup that cannot tell says so in the archive.
  • A relative --output is recorded as the path it resolves to, not as it was typed. rad backup --output backups/nightly.tar.zst left doctor, ls and diff looking for it under whatever directory they were run from, and reporting the archive missing.
  • doctor judges the newest archive by looking at it, rather than by its own record of the last run. Machines with working nightly backups were told "no archive has ever been taken for this identity", because the timer runs as another user or the home came back through restore.sh, and an archive written with --plaintext was called encrypted.
  • schedule --status recognises a timer that systemd reports as enabled-runtime. It was compared against the exact word enabled, so the owner of a live timer was told no backup was scheduled on the machine.
  • ls reads whether an archive is encrypted from the file rather than from its name. rad backup --stdout > name.tar.zst writes an encrypted archive under a name that says otherwise, and the listing told its owner it could be read by anyone. An archive whose first bytes could not be read says so, and ls --json can report "encrypted": null.
  • rad backup no longer fails outright when heartwood renames a table in the node database. Two of its three readers aborted the run with an sqlite error; every reader answers "not known" now and names the table that has moved on, in the run's output and in the archive's warnings.
  • A node database that will not open no longer ends the whole doctor report before a single check has printed. The three checks that read it say so and name the error, and none of them turns a file it could not open into a finding: private repositories used to be the one that could, calling a repository "on no other node" off a routing table nobody had read.
  • doctor no longer sends you to start a node that is already running when the node database is there and will not open, or holds a table this build cannot read. Both arrived at the check as the same empty answer as a node that has never run.
  • doctor's key copies check no longer passes a home it knows nothing about. sudo rad-backup restore writes its record into root's state directory and restore.sh writes none at all, so the two people most likely to be holding a second copy of their key were the ones told they were not.
  • doctor no longer tells you to rad sync --announce repositories that may be private. With no rad on PATH nothing looks private, and two checks counted every undescribed repository as public; both say when they could not describe them all now.
  • doctor no longer reports a private repository somebody else delegates as being in no archive and on no other node. A second delegate holds it by definition.
  • doctor's private repositories check says that it is going by this tool's own record of the last run. It printed "all N of them are in the newest archive" as a pass in the same report whose freshness line said that archive was missing.
  • doctor no longer reports work as stranded on this disk because the node's own record spells a commit id in uppercase.
  • A state file that is there and cannot be read is no longer reported as one that was never written, and a permission error on it no longer ends the whole doctor report.
  • A restore no longer reports seeding and following policies an identity-tier archive never carried. The numbers came from the manifest rather than from the database that was installed, and the next diff blamed the difference as drift.
  • restore --replay-policies on a machine without rad now refuses before anything is written. It used to exit 4, the code that means nothing was written, over a home it had already rewritten, and skip the record of where the home came from on the way out.
  • A restore that cannot tell whether a node is running because the home's path is too long now says which path it is, how long a control socket may be, and what to do about it. It printed path must be shorter than SUN_LEN and stopped, naming none of the three. On macOS the system temp directory alone spends half the budget, so a home a couple of directories deeper than usual runs out of it.
  • A repository whose packed-refs cannot be read is named in the run's output rather than passed over as somebody else's. With rad also unavailable, --repos mine wrote an archive missing it and said nothi...
Read more

v0.2.1

Choose a tag to compare

@github-actions github-actions released this 22 Aug 14:38
v0.2.1
1a9052f

Fixed

  • nix build works again. The flake runs the test suite as part of the build, and one test needs jq to read a manifest the way the shipped script does, which the build environment did not have, so v0.2.0 would not build from the flake at all.
  • The restore.sh inside an archive refuses the same HEAD values rad backup refuses. It used to let through a few that git itself rejects, such as a name whose component starts with a dot or ends in .lock, so the two readers of one archive could put back different things.
  • The restore.sh inside an archive says when jq is missing, instead of putting every repository back without its HEAD and saying nothing about it.

Full Changelog: v0.2.0...v0.2.1

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 21 Aug 21:49
v0.2.0
1669c39

Added

  • doctor now warns when another machine may still be holding your key. Restoring an ordinary backup leaves the key on the machine the backup came from, and two machines running one key fork your own history. rad backup move retires the old key, so a home moved here is fine. The check is called key copies, and it can only answer for a home restored by this version or later.
  • doctor now names the public repositories with changes no other node has yet, so you can see what a dead disk would take with it. The check is called signed refs propagation.
  • schedule --recipient and schedule --plaintext: a scheduled backup can encrypt to an age or ssh key, or skip encryption when the destination already encrypts. Neither needs a passphrase file.

Changed

  • doctor's seeding elsewhere check is now called other seeds, so the name reads the same whether the check passes or fails. If you match on topic names in --json, this one changed.

Fixed

  • A crash or a full disk partway through a restore can no longer leave a home holding neither the old identity nor the new one. The key files and config.json are written beside their targets and renamed into place.
  • restore no longer gives up on the whole home because one repository failed. The rest are restored, the failures are named, and the run exits 3.
  • A repository whose restore fails partway no longer leaves an empty repository behind, which later backups would have counted as real.
  • restore without git on PATH now says how many repositories it could not put back, instead of reporting success.
  • restore checks that the node is still stopped immediately before it writes, not only before it reads the archive. Unpacking a large archive leaves plenty of time for a node to start.
  • restore --force over another identity now keeps the public half of the displaced key beside the private half it files away. Only the private half survived before; the public half can be recomputed from it, so nothing was ever lost.
  • restore --replay-policies no longer throws away what rad said about each policy. A seeding or following decision that did not go back is named, and the run exits 3. A restore that put back every repository and not one policy used to exit 0 in silence.
  • The copy-paste block in RESTORE.md that puts your identity back now refuses to run over a home that already holds a key. It used to print a warning and overwrite the key on the next line.
  • restore.sh inside an archive no longer claims to have restored policies that its tier never carried.
  • A backup no longer fails after the archive is already written. A .README.txt that could not be placed beside it, or old archives that could not be pruned, are warnings now instead of an exit 1 over a good archive.
  • A repository git cannot read no longer stops the whole backup. It is named, carried into the manifest with no refs, and the archive is written and marked incomplete (exit 3).
  • A repository whose visibility rad could not report is now treated as private and named in a warning. It used to be taken for public, which left it out of --repos private.
  • A followed peer with no alias no longer fails the backup's read of the policies database.
  • --stop-node asks for the archive passphrase before it stops the node, not while the node is down waiting for somebody to find it.
  • --stop-node now reports when rad node stop itself failed, and gives up at once instead of waiting out the whole timeout on a node that was never going to stop.
  • The refusal over a home too large for one archive now suggests --repos private or --repos mine, which do narrow what is carried. It used to suggest splitting the home across several --repos runs, which the flag cannot do.
  • diff against an archive taken with --repos all or --repos seeded no longer reports every repository that is not your own as gone, on every run. It exits 0 when nothing has changed, so a scheduled diff can decide whether tonight's backup is needed.
  • doctor no longer says an unencrypted archive holds your private key in the clear when the key inside carries its own passphrase. It now says the archive can be read by anyone who holds it, which is true either way.
  • doctor's remedy for an unprotected key names the key's real path, instead of $RAD_HOME/keys/radicle, which was not a runnable command for anyone who never set RAD_HOME.
  • verify --deep without git on PATH says how many bundles it could not open, instead of passing.
  • The warnings about a repository rad could not describe or git could not read no longer promise it a place in the archive when the run was never going to carry it.
  • Output a machine consumes (JSON reports, listings, recovery sheets) now fails the run when it cannot be written, instead of exiting 0 over a truncated report. A pipe closed on purpose, as ... | head does, still counts as success.
  • --dry-run --json prints a JSON report, like every other --json, instead of the human-readable table.
  • create --stdout --json is refused, instead of writing the archive and the report into the same stream.
  • diff --json names moved repositories by rid, like every other list in the report, instead of by display name.
  • schedule no longer accepts a RAD_BACKUP_PASSPHRASE exported in your shell as proof that the timer can get a passphrase, because systemd starts the service from its own environment. One that systemd itself holds still counts, so a working timer is not refused.
  • A binary or output path containing a space now produces a unit systemd can run and a crontab line a shell can run.
  • A recipient holding a character systemd or a shell treats specially (a $ or %, a quote, a backslash) now reaches the scheduled run exactly as you typed it, in both the systemd unit and the printed crontab line.
  • schedule --status says when systemd could not be asked at all, as over ssh to a headless machine, instead of reporting a running timer as disabled.
  • The marker lines in a generated systemd unit now say what is true: a unit that keeps them is rewritten by the next schedule run, and deleting them is what preserves a hand edit. The environment file, which every run rewrites in full, no longer carries the marker.
  • A flag typed before its verb, as in rad backup --tier full create, now gets a message saying where the flag belongs, instead of an error that reads as if the flag does not exist.
  • Failing to open a recipient-encrypted archive points at --identity and the kind of key it was encrypted to, instead of blaming a passphrase that was never involved.
  • Write and parse errors name the file they are about.
  • A node database that cannot be read is named in the error, instead of a bare unable to open database file with no path.
  • An archive whose manifest will not parse is named in the error, instead of a bare expected value at line 1 column 1 with no file attached.
  • Reading a node database that has a write-ahead log beside it leaves a -shm file in the home, and the run now says so instead of staying silent.
  • The manifest records the hostname on macOS and the BSDs, which have neither /etc/hostname nor HOSTNAME and so recorded nothing at all.
  • Counts agree with their nouns, so no line reads "1 repositories".

Security

  • paper without --output no longer writes the sheet to a path taken from RAD_BACKUP_DIR. A recovery sheet carries the secret key, and could land unasked where backups go, which is often a directory synced off the machine.
  • A head in the manifest is refused unless it really names a ref, rather than being handed to git symbolic-ref. A value like -d would otherwise reach git as one of its own flags, and git symbolic-ref stores whatever it is given without checking, so a value like refs/../../evil would write a file next to the repository the next time anything updated that ref. Both restore and the shipped restore.sh check it now, and the repository still comes back, without its HEAD.
  • restore --replay-policies skips a seeding or following row whose identifier rad would read as a flag, and names what it skipped. Those values come out of the archive, and nothing had vouched for them before they reached a command line.
  • The shipped restore.sh skips a bundle whose name is not a repository id, rather than trusting the name it was handed. rad backup already refuses such an archive; the script is what runs when rad backup is not there.

Full Changelog: v0.1.0...v0.2.0

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 16 Aug 22:34
v0.1.0
a4ccd4f

Added

  • rad backup: encrypted archives of a Radicle identity, node state and repositories, in three tiers (identity, state, full) with --repos to override what each carries.
  • restore: staged, digest-checked restores that compare every restored repository with the network before handing back control, so a stale archive cannot fork your peer history.
  • verify and verify --deep: digests, and a proof that the archive really does rebuild the identity it names.
  • doctor: seven checks on how recoverable an identity currently is, each naming the command that fixes it. Exits 3 when any check fails, so it works as a monitoring probe.
  • diff: what has changed since the last archive, with no passphrase and no decryption. Exits 3 on drift, so rad backup diff || rad backup is a complete scheduling policy.
  • show: what is inside an archive, as prose or as JSON.
  • ls: every archive of this identity on disk, newest first, without opening any of them.
  • prune: the same retention rule as --keep, on its own, with --dry-run.
  • schedule: installs and turns on a systemd user timer, and refuses to enable one that has no way to get a passphrase.
  • --dry-run: what a backup would carry, and roughly how large, writing nothing.
  • Every command that takes an archive now defaults to the newest one of this identity it can find, and says which it chose.
  • move: a machine-to-machine move that retires the source key only after the archive verifies deeply.
  • paper: a printable recovery sheet with a QR code, and --words for a 24-word mnemonic that restore --words reads back.
  • Encryption to a passphrase or to age and ssh recipients, with --plaintext for archives going straight into a store that encrypts them.
  • A recovery path that needs nothing but tar, git and a POSIX shell: RESTORE.md and restore.sh ride inside every archive.
  • Shell completions (completions) and a man page (man).
  • Reproducible builds: a pinned toolchain, one codegen unit, SOURCE_DATE_EPOCH taken from the commit and remapped paths, checked twice over by CI and by the Nix flake.
  • Signed releases: sha256sums.txt carries an ssh signature that packaging/release/verify.sh checks against packaging/release/allowed_signers.
  • Packages: .deb for amd64 and arm64 from a signed apt repository at https://apt.radicle.tools, tarballs for Linux, macOS and FreeBSD, a .zip for Windows, a crate, and a Nix flake.
  • An audit map in SECURITY.md: every file that touches a secret and what each has to convince a reviewer of.
  • A rad-restore symlink to the same binary, so rad restore <archive> also works.

Full Changelog: https://github.com/maninak/radicle-backup/commits/v0.1.0