TARPATCH(1) General Commands Manual TARPATCH(1)

tarpatch
apply binary delta to directory tree

tarpatch [-nqRv] [-m mtree] [-r rollback] delta

The tarpatch utility verifies and applies the changes in a delta archive delta computed by tardiff(1) to the directory tree rooted at the working directory.

tarpatch does not delete files — it only creates new ones or modifies existing ones. Use another tool such as postinstall(8) to delete files that are no longer needed.

tarpatch refuses to create files that would overwrite existing ones.

The following options are supported:

Dry run. Don't patch or create any files — just verify the original tree and, with -v, show the files to be changed. If there is a rollback log, just refuse to run; caller is responsible for rolling back with the -R option in this case in order to see what the effects of a patch would be.
mtree
Specify a relative path inside the tree where an mtree(1) file describing the tree resides. This should match the -m option passed to tardiff(1), in order to verify that the mtree file itself was correctly updated.
Quiet. Suppress informative messages to standard error identifying stages in the merge process.
rollback
Before changing anything, either apply or create a rollback log at rollback of all files that are modified or created by the delta archive.

With the -r option, tarpatch is idempotent. Additionally, the patch can be rolled back with the -R option.

Note: tarpatch will first create the file ⟨rollback.tmp, and then rename it to rollback, in order to create rollback atomically in case of interruption. Thus, if rollback is a symlink, the symlink itself will be replaced; tarpatch will not write to the target of the symlink.

Stop after applying the rollback log, if any, and verifying the old tree.
Verbose. Print informative messages to standard error for every file patched and created.

BSPATCH
bspatch(1) program.
MTREE
mtree(1) program.
PAX
pax(1) program.

bspatch(1), mtree(1), pax(1), tar(1), tardiff(1)

tarpatch is not atomic — programs running at the same time may see the directory tree only partially patched, and, if writing to the tree, may corrupt the rollback archive. Consider working in a zfs(8) clone.

tarpatch is new and may have bugs. Take and test backups regularly.

It is the caller's responsibility to serialize tarpatch operations if they overlap, to maintain the correct order for any sequence of rollbacks, and to use the same rollback log only with the same delta.

January 5, 2021 NetBSD 9.1_STABLE