TARPATCH(1) | General Commands Manual | TARPATCH(1) |
tarpatch
—
tarpatch |
[-nqRv ] [-m
mtree] [-r
rollback] delta |
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:
-n
-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.-m
mtree-m
option passed to
tardiff(1), in order to verify that the mtree file
itself was correctly updated.-q
-r
rollbackWith 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.
-R
-v
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 |