Repository navigation
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 nothing. - A dry run says when part of storage could not be measured. The estimate is meant to run high, and an unreadable directory silently counted as zero was the one thing making it run low.
--jsonsays so too. - A home displaced twice keeps both notes about it.
DISPLACED.txtwas overwritten, so a secondrestore --forceover another identity left two retired keys and one paragraph naming only the newer, and the older key was the one nobody could place. The note is also written at0644, like a home's other documents, rather than at whatever the umask gave. - The note a
moveleaves behind names the key that move actually retired, and no longer destroys the note the move before it left. A second move puts its key atradicle.retired.2while the note still saidradicle.retired, sending the one person who reads that file to the wrong key. - A
moveno longer fails over that note. The key is renamed first, so a note that could not be read or written ended the run saying the move had failed, over a machine whose key was already retired, and withheld the line naming where the key went. Both failures are said out loud now and the move finishes; a note that is there and unreadable is left exactly as it is. rad backup move --keep-sourceno longer writes an archive claiming the source machine retires its key. A home restored from it was told the machine it came from was safe.- The
RESTORE.mdinside every archive saidrad-backup restore"refuses to continue" when the histories have diverged. It does not: it compares after restoring, names those repositories and exits3, which is what it says now. - The note written beside a recipient-encrypted archive gave a command that cannot open it:
age -d <file>asks for a passphrase such an archive does not have, and therad-backuplines beside it left out--identity. It names the keys the archive was encrypted to now, and how to give one. scheduleno longer overwrites a unit file it cannot read. A hand-written unit saved unreadable, or holding bytes that are not UTF-8, was the one file the "not written by this tool" check could not see.pruneandrad backup --keepsay when the note beside an archive they deleted would not go. The archive went, the note describing it stayed, and the error saying why was dropped.ls,prune,--keepand the default archive see an archive that is a symlink, and refuse to act on a directory holding an archive of this identity they could not examine, instead of listing it as 0 B or leaving it out.prune --diranddoctor --dirsay in--helpthat they readRAD_BACKUP_DIR. They always did, but onlyls --dirsaid so.- The man page now documents every command and its options, such as
restore --forceandrestore --no-reconcile, which were in--helponly. It sent readers to arad-backup-<command>(1)page per command that no package installs. verifysays "2 problems" rather than "2 problem(s)".
Security
- A repository config out of an archive can no longer make
gitrun a command. It was copied intostorage/<rid>/configverbatim, wherecore.pager,core.fsmonitorandremote.<name>.url = ext::sh -c ...are each run on an ordinary operation in that repository. A restore now carries over the node's name and DID and nothing else, because everything else in that file is whatgitworks out about the disk it is running on, and it names what it left behind. A config git cannot parse costs those two settings, not the repository. The shippedrestore.shand the commands inRESTORE.mddo the same. - The signed-ref oids in a manifest are checked before they reach
git, and a manifest whose node id is not the key it carries is refused. A value out of an archive nobody vouched for could be read bygitas one of its own flags, and a node id that disagreed with the key made every repository come back with nothing to compare, so a restore exited0having compared nothing. - A restore now says where
keys,nodeorstorageleads when one of them is a symlink, and asks before writing anything. Everything that writes walks through a link standing at a directory, so akeysaimed at a directory somebody else owns took the private key out of the home and left it there, and astorageaimed at one took every repository, private ones included. A run with nobody to ask refuses;--yesanswers yes, because an unattended restore into a deliberately relocatedstoragehas to be possible, so--yesis now also the flag that says "write through my home's links".--forceis not: it is permission to overwrite what is in the home, never to write outside it. The same three are read again after the archive is unpacked and before the repositories go in, and a link that has changed since the question was answered is refused whatever the flags say. A symlink at a single repository's own name skips that repository and finishes the rest. - The
restore.shinside every archive refuses such a home outright, and refuses a symlink at the identity, its public key,config.jsonor a node database as well: it copies withcp, which writes straight through one, whererestorereplaces the link instead. A dangling link at the key's own name is not a file, so the guard that refuses an occupied home used to walk straight past it. The blocksRESTORE.mdgives somebody to paste refuse such a home too, both the one that puts the identity back and the one that puts the repositories back. restore --wordswrites the public key the way it writes the key beside it, so a symlink standing atkeys/radicle.pubis replaced rather than followed and truncated, and the file lands at0644rather than at whatever the umask allowed.- The
rad seed,rad blockandrad followlines thatRESTORE.mdbuilds out ofpolicies.jsonare quoted. They are printed for somebody to read and then run, and the repository ids, peer ids and scopes in them come out of the archive, so one carrying; curl ... | shwas a second command on a line that otherwise looked ordinary. Quoted, the worst an archive can do there is handrada name it rejects. - A restore says when the git it is using checks nothing inside a bundle. It passes
fetch.fsckObjects, which is the whole of what stops a bundle writing a tree entry named.gitinto storage, and git consults it on a bundle only from 2.46: every older git accepted the setting and ignored it.restoreand the shippedrestore.shboth say so now, and name the git that runs the check. Both also read a release-candidate version such as2.45-rc1as one they cannot tell about, which in the script meant printing a shell error at somebody mid-recovery. schedulerefuses a home, output path or--passphrase-filewith a line break in it, instead of writing it into the file systemd reads a setting at a time. A directory whose name carries a newline is legal, and everything after it became a second setting in a file an unattended timer reads.- The
keys/directory a recovery sheet rebuilds, the home it rebuilds it in, and the state directory every run keeps its record in, are owner-only rather than whatever the umask gave. The files inside were already owner-only; the names were the leak, one per DID this machine holds a record for. - Setting up a timer no longer leaves a copy of the archive passphrase in freed memory. It asks systemd for its whole environment to find out whether the passphrase is already kept there, and that answer was read into an ordinary buffer.
restore --wordsno longer leaves partial copies of the 24 words in freed memory. The line they are typed into started empty and grew as it was read, and every growth left what had been read so far behind, where the wiping around the finished buffer never reaches.paperno longer leaves plaintext copies of the key in freed memory while escaping it, rendering its QR code, or filling the sheet. The buffer was sized counting each value once, and the sheet names the alias twice, so a long enough alias grew it halfway through and left a copy of the key behind. The sheet it prints is byte for byte the same.
Full Changelog: v0.2.1...v0.3.0