Rm
Removes files and directories from a backup.
$ hb rm [-c backupdir] [-r version] path1 path2 ...
[-i] [-n] [-v] [-y]
[--secure] [--ex]
Only root or the owner of a version (the userid that created the backup version) can remove files from that version.
Pathnames must be complete as shown in a listing of the backup. Paths
must begin with a slash or leading ./ is also allowed and the current
directory is prepended. For safety reasons, wildcards cannot be used
with the rm command. Directories can be removed and there is no
extra confirmation when removing directories. The root path (/)
cannot be removed.
Options
-r remove files from a specific version. The default is to remove
all versions.
-i prompt for confirmation before each file or directory is removed.
The default response is no but -iy changes the default response to
yes.
-n does most of the remove processing but does not actually remove
anything. This can be used with --ex, -i and -v to see
what would be removed. It will show how much would be deleted in user
file space, before compression and dedup, but does not show much backup
space would be saved like a remove without -n does.
-v displays each path as it is removed.
-y make default confirmation yes rather than no with -i. Can be
combined with -i as in -iy.
--secure forces immediate packing of all arc files affected by this
rm, ignoring any pack- config options and limits, so that deleted
data blocks are physically deleted from the backup. This is usually
not necessary since rm deletes the recipe for reconstructing a file,
making it impossible to restore, but it can be useful when
confidential data is removed to ensure that even the encrypted data
blocks are removed from the backup. If multiple paths are being
removed it is most efficient to do all secure removals in one command
line to avoid repacking arc files more than once.
If files are removed without --secure, it is not possible
to remove them later with --secure because the recipe relating
blocks to files has been removed from the database.
|
--ex removes files in the backup that should have been
excluded according to inex.conf. This could happen because of a bug
in backup’s exclude processing, an excluded file could be listed on
the backup command line, or a file could be backed up first and then
excluded later. --ex can be combined with other rm options.
While wildcards are not permitted on the rm command line,
they are usually present in the inex.conf file and will be used by
the --ex option to remove files. It is recommended to run ls
--ex -ad or rm -vn first to see which files will be removed.
|
Space Recovery
HashBackup tries to strike a good balance between bandwidth and
storage efficiency. When half of the data in an archive file has been
deleted with rm or retain, the archive file is packed to recover
the deleted space and all destinations are updated. This is
controlled with the pack-percent-free and other pack- config
options. Check the config command pack
options for more details.