Add a new option -H <path> to cpdup. This option allows cpdup to be used
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 4 Jul 2006 00:32:03 +0000 (00:32 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 4 Jul 2006 00:32:03 +0000 (00:32 +0000)
commit4e316ad56fbd7b0bbae5070be08b77a1c37bf1d5
treed76ddb8cf850f494ef1af392b7a5bb40c9cc29b5
parentb54f92f5f9b2a938e19489b6e0ff956068bea275
Add a new option -H <path> to cpdup.  This option allows cpdup to be used
to create incremental backups.

cpdup operates per normal.  However, if the -H option is specified with a
path to some prior (read-only) backup of the source tree, cpdup will
check whether the file in the source tree matches ethe file in the
prior backup and if it does it will create a hardlink from the prior backup
to the target tree instead of copying the file.

Warning: due to the way cpdup handles hardlinks, it must record the file
paths for all hardlinks it encounters while it is traversing the directory
tree.  If copying a very large tree with lots (e.g. millions) of files it
is possible to run the process out of memory.
bin/cpdup/cpdup.1
bin/cpdup/cpdup.c