How to restore(8) an OpenBSD dump(8)
====================================
date: 2024-10-27
tags: openbsd

In my infinite wisdom and excitement to use OpenBSD
native tooling, I chose dump(8) as a backup tool
when I was sysadmin-ing a little tilde server
(garbash).

I recently wanted to get a directory out of the dump
but having not touched restore(8) for years totally
forgot how to do it (note to future self: just use
tar(1)!)

Anyways, the gist of the command was to run it
interactively:

$ restore -f my-dump.0 -i
> add path/to/dir
> extract
You have not read any tapes yet.
Unless you know which volume your file(s) are on you should start
with the last volume and work towards the first.
Specify next volume #: 1
set owner/mode for '.'? [yn] y

The prompt for the volumes scared me at first, but
as indicated by the readme and this site [1], the
tool was built for restoring dumps across multiple
tapes. In the case of a file-based restore, the
volume is always 1!

[1]: https://wiki.ircnow.org/pmwiki.php?n=Openbsd.Restore

See also: https://www.dayid.org/comp/openbsd/dump-restore.html