Repository navigation
Releases
v0.5.0
Added
radicle-backupis now also a Rust library, so other programs can read and writerad backuparchives. Withdefault-features = falseit has no command line, no SQLite and no file system access, and it builds for WebAssembly.tests/fixturesholds sample archives that another implementation can test against.
Fixed
restorenow 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 --forceover 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.--identitynow takes an age key file asage-keygenwrites it, with its#comment lines.doctornow fails a passphrase archive whose encryption header cannot be read. It used to call it fine.
Security
verifyandrestorenow refuse an archive with clashing or oddly spelled file names, such as./a/bbesidea/b, names that differ only in case, orNUL. Such an archive could passverify --deepand then restore different files from the ones it checked.verifyandrestorenow 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
Fixed
restore --wordsnow also sets your node's alias, sorad node startworks right after it. It asks for the alias printed on your recovery sheet. It used to restore only the key, andradcould not start a node from that home.- A passphrase-protected archive written on a much faster machine now opens on a slow one.
agemakes a passphrase cost about a second to check on the machine that wrote the archive, so a slower machine takes longer.rad backupfirst says how long the check will take and how much memory it needs. It used to refuse, and said the right passphrase was wrong. movenow 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 --offnow also works aftermoveretired the key on this machine.- Several small
restorefixes:- When rebuilding a repository's issue or patch list fails,
restorenow prints the exact command to retry it. - The commands
restoreandrestore.shprint 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
doctoranddiffknow. - The messages
restore.shprints no longer garble a path that holds a backslash. restore --replay-policiesnow 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.
- When rebuilding a repository's issue or patch list fails,
- A damaged archive is now named in the error that reports the damage.
verifyandrestoreused 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 backupuses zstd.
Full Changelog: v0.4.1...v0.4.2
v0.4.1
Fixed
- A restored home now automatically lists its issues and patches.
rad issue listandrad patch listused to show nothing after a restore, until their cache was rebuilt by manually runningrad cob migrate, thenrad issue cache --repo <rid>andrad patch cache --repo <rid>for each repository. ls,show,verifyandprunenow 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.prunenow exits4there. It used to exit0.
Full Changelog: v0.4.0...v0.4.1
v0.4.0
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 foundrad. Its backups then left out your private repositories, and with--keepthey may have deleted the older archives that still had them. - If a script matches text in
doctor,verifyorrestore--jsonoutput, change it. Fordoctorandverify, match each check on its newcheckIdinstead. Thedoctorchecks once calleddelegate quorum,other seedsandsigned refs propagationhave the idssole-delegate,public-repositoriesandunshared-work. Forrestore, read theatRisk,aheadandnotCheckedlists.
Added
doctor --jsonandverify --jsonnow give each check an id that stays the same when the wording changes. It is calledcheckId.restore --jsongives each repository one too, calledstandingId.
Changed
- Output across commands is reworded into plainer, more immediately understandable sentences. The summary after a backup labels each line.
doctorshows 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".--jsonhas a newskippedverdict and count.doctorwarns 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
radnow exits3. Withoutradit cannot tell which repositories are private, so it saves none of them. It used to exit0, so a scheduled run looked successful. --keepandpruneno 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.
pruneand--keepused to delete such a file first. - A timer set up by
rad backup schedulenow findsrad, even in~/.radicle/bin. A timer does not see your shell's PATH, soschedulenow saves whereradis. Whenschedulecannot findrad, it sets up no timer. schedulenow 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
restorecould not compare a repository, it now tells you to clone it into a new, emptyRAD_HOMEbefore you write. It used to suggestrad sync --fetch, which cannot show that another node has newer work of yours. restorenow 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-reconcileno longer warns that repositories could not be compared. You turned the comparison off, so there is nothing to warn about.diffnow 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 --jsonlists the changes in a newpoliciesfield, which isnulluntil then.diffno longer lists a new repository twice.verify --deepnow 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.doctorand other commands no longer warn about a helper file next to the node's database. SQLite creates that file, and it is harmless.- Several
doctorfindings 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.
shownow 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 moveandrestore --wordsnow 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-runyou had not passed. - An empty passphrase no longer suggests
--plaintext. That flag only matters when you create an archive. - When
RADis set to a program that cannot be run, commands now say so. They used to sayradwas not on PATH.
Full Changelog: v0.3.0...v0.4.0
v0.3.0
Added
doctornow opens the newest archive with the--identitykey 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_FILEandRAD_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--helpsays which is which.- A
--recipientrun 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
-
restorenow 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 reportsanother node holds signed refs this copy does not haveat exit3. -
A restore that meant to compare and could not, now exits
3instead of0. NoradonPATH, 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:3says the fork check did not run, not that anything is missing.--no-reconcilestill exits0, because a check you declined is not a check that failed. -
restore's verdicts and--jsonfields changed with that comparison, so anything matching on them needs updating:Was Is now in step with the networkno other node has reported holding anything elsediverged from the networkanother node holds signed refs this copy does not haveholds work the network has not seenholds work no node that answered has, orholds work no node had when the archive was takenthe network was ahead, and has been takengone: a pull cannot establish it not checkedcould not be compared, ornothing to compare it with"diverged", the list"atRisk""notChecked", a count"notChecked", the list of repositories it used to countnew: "ahead","aheadOfAStaleRecord","nothingToCompare" -
restorenow 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--jsoncarries them all. -
doctorexits3when every check came back "could not be checked", instead of0. A run with norad, 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 exits0. -
doctor --backup-diris nowdoctor --dir, matchinglsandprune, and the checks look in it rather than only naming it in a remedy.--backup-dirkeeps working and is not going away. -
rad backup manat a terminal now exits1with 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. -
--helpnow puts the options that work with every command, such as--homeand--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 earliermove, deleted, or merely could not be read, and the restore then rewound every repository's refs, other peers' namespaces included.--forcestill overwrites, and names what it is about to write over. - A home whose
keysdirectory could not be listed all the way through is no longer read as one holding no key an earliermoveretired, which is the answer that let a restore go ahead over somebody's displaced key. restoreno longer says your peer history has forked becausegitcould 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
agedoes 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
raditself would use, and a socket that could not be asked is no longer read as a stopped node.RAD_SOCKETwas ignored, so a node started under it was invisible, and a permission error answered "stopped" about a node that was up.restoreandmoverefuse rather than guess, and a backup that cannot tell says so in the archive. - A relative
--outputis recorded as the path it resolves to, not as it was typed.rad backup --output backups/nightly.tar.zstleftdoctor,lsanddifflooking for it under whatever directory they were run from, and reporting the archive missing. doctorjudges 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 throughrestore.sh, and an archive written with--plaintextwas called encrypted.schedule --statusrecognises a timer that systemd reports asenabled-runtime. It was compared against the exact wordenabled, so the owner of a live timer was told no backup was scheduled on the machine.lsreads whether an archive is encrypted from the file rather than from its name.rad backup --stdout > name.tar.zstwrites 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, andls --jsoncan report"encrypted": null.rad backupno 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
doctorreport 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 repositoriesused to be the one that could, calling a repository "on no other node" off a routing table nobody had read. doctorno 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'skey copiescheck no longer passes a home it knows nothing about.sudo rad-backup restorewrites its record into root's state directory andrestore.shwrites 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.doctorno longer tells you torad sync --announcerepositories that may be private. With noradonPATHnothing looks private, and two checks counted every undescribed repository as public; both say when they could not describe them all now.doctorno 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'sprivate repositoriescheck 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.doctorno 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
doctorreport. - 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
diffblamed the difference as drift. restore --replay-policieson a machine withoutradnow refuses before anything is written. It used to exit4, 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_LENand 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-refscannot be read is named in the run's output rather than passed over as somebody else's. Withradalso unavailable,--repos minewrote an archive missing it and said nothi...
v0.2.1
Fixed
nix buildworks again. The flake runs the test suite as part of the build, and one test needsjqto 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.shinside an archive refuses the sameHEADvaluesrad backuprefuses. 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.shinside an archive says whenjqis missing, instead of putting every repository back without itsHEADand saying nothing about it.
Full Changelog: v0.2.0...v0.2.1
v0.2.0
Added
doctornow 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 moveretires the old key, so a home moved here is fine. The check is calledkey copies, and it can only answer for a home restored by this version or later.doctornow 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 calledsigned refs propagation.schedule --recipientandschedule --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'sseeding elsewherecheck is now calledother 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.jsonare written beside their targets and renamed into place. restoreno longer gives up on the whole home because one repository failed. The rest are restored, the failures are named, and the run exits3.- A repository whose restore fails partway no longer leaves an empty repository behind, which later backups would have counted as real.
restorewithoutgiton PATH now says how many repositories it could not put back, instead of reporting success.restorechecks 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 --forceover 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-policiesno longer throws away whatradsaid about each policy. A seeding or following decision that did not go back is named, and the run exits3. A restore that put back every repository and not one policy used to exit0in silence.- The copy-paste block in
RESTORE.mdthat 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.shinside 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.txtthat could not be placed beside it, or old archives that could not be pruned, are warnings now instead of an exit1over a good archive. - A repository
gitcannot 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 (exit3). - A repository whose visibility
radcould 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-nodeasks for the archive passphrase before it stops the node, not while the node is down waiting for somebody to find it.--stop-nodenow reports whenrad node stopitself 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 privateor--repos mine, which do narrow what is carried. It used to suggest splitting the home across several--reposruns, which the flag cannot do. diffagainst an archive taken with--repos allor--repos seededno longer reports every repository that is not your own as gone, on every run. It exits0when nothing has changed, so a scheduleddiffcan decide whether tonight's backup is needed.doctorno 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 setRAD_HOME.verify --deepwithoutgiton PATH says how many bundles it could not open, instead of passing.- The warnings about a repository
radcould not describe orgitcould 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
0over a truncated report. A pipe closed on purpose, as... | headdoes, still counts as success. --dry-run --jsonprints a JSON report, like every other--json, instead of the human-readable table.create --stdout --jsonis refused, instead of writing the archive and the report into the same stream.diff --jsonnames moved repositories by rid, like every other list in the report, instead of by display name.scheduleno longer accepts aRAD_BACKUP_PASSPHRASEexported 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 --statussays when systemd could not be asked at all, as over ssh to a headless machine, instead of reporting a running timer asdisabled.- The marker lines in a generated systemd unit now say what is true: a unit that keeps them is rewritten by the next
schedulerun, 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
--identityand 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 filewith no path. - An archive whose manifest will not parse is named in the error, instead of a bare
expected value at line 1 column 1with no file attached. - Reading a node database that has a write-ahead log beside it leaves a
-shmfile 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/hostnamenorHOSTNAMEand so recorded nothing at all. - Counts agree with their nouns, so no line reads "1 repositories".
Security
paperwithout--outputno longer writes the sheet to a path taken fromRAD_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
headin the manifest is refused unless it really names a ref, rather than being handed togit symbolic-ref. A value like-dwould otherwise reach git as one of its own flags, andgit symbolic-refstores whatever it is given without checking, so a value likerefs/../../evilwould write a file next to the repository the next time anything updated that ref. Bothrestoreand the shippedrestore.shcheck it now, and the repository still comes back, without itsHEAD. restore --replay-policiesskips a seeding or following row whose identifierradwould 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.shskips a bundle whose name is not a repository id, rather than trusting the name it was handed.rad backupalready refuses such an archive; the script is what runs whenrad backupis not there.
Full Changelog: v0.1.0...v0.2.0
v0.1.0
Added
rad backup: encrypted archives of a Radicle identity, node state and repositories, in three tiers (identity,state,full) with--reposto 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.verifyandverify --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. Exits3when any check fails, so it works as a monitoring probe.diff: what has changed since the last archive, with no passphrase and no decryption. Exits3on drift, sorad backup diff || rad backupis 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--wordsfor a 24-word mnemonic thatrestore --wordsreads back.- Encryption to a passphrase or to age and ssh recipients, with
--plaintextfor archives going straight into a store that encrypts them. - A recovery path that needs nothing but
tar,gitand a POSIX shell:RESTORE.mdandrestore.shride inside every archive. - Shell completions (
completions) and a man page (man). - Reproducible builds: a pinned toolchain, one codegen unit,
SOURCE_DATE_EPOCHtaken from the commit and remapped paths, checked twice over by CI and by the Nix flake. - Signed releases:
sha256sums.txtcarries an ssh signature thatpackaging/release/verify.shchecks againstpackaging/release/allowed_signers. - Packages:
.debfor amd64 and arm64 from a signed apt repository at https://apt.radicle.tools, tarballs for Linux, macOS and FreeBSD, a.zipfor 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-restoresymlink to the same binary, sorad restore <archive>also works.
Full Changelog: https://github.com/maninak/radicle-backup/commits/v0.1.0