The cpdup utility makes an exact mirror copy of the source in the
destination, creating and deleting files and directories as necessary.
UTimes, hardlinks, softlinks, devices, permissions, and flags are
mirrored. By default, cpdup asks for confirmation if any file or directory
needs to be removed from the destination and does not copy files which it
believes to have already been synchronized (by observing that the source
and destination files' sizes and mtimes match). cpdup does not cross
mount points in either the source or the destination. As a safety
measure, cpdup refuses to replace a destination directory with a file.
The cpdup utility was originally created to update servers at
BEST Internet circa 1997 and was placed under the FreeBSD copyright for
inclusion in the Ports Collection in 1999.
This utility was written by Matthew Dillon, Dima Ruban, and later
significantly improved by Oliver Fromme.
Upstream source:
DragonFly BSD's bin/cpdup
Manual page: cpdup(1)
- DragonFly BSD
- FreeBSD
- NetBSD
- Linux
(Welcome to help test on and port to more platforms)
-
Install dependencies:
make(GNU make)gccpkg-configlibssl-dev(OpenSSL >= 1.0.2 or LibreSSL)
Arch Linux:
pacman -S pkgconf opensslCentOS:
yum install pkgconfig openssl-develDebian:
apt install pkg-config libssl-devDragonFly BSD / FreeBSD:
pkg install gmake pkgconf libressl -
Build:
make -
Install:
sudo make install [PREFIX=/usr/local]
Debian Linux:
$ make debpkg
$ sudo dpkg -i cpdup_*.deb
Arch Linux:
$ make archpkg
$ sudo pacman -U cpdup-*.pkg.*
CentOS:
$ make rpm
$ sudo rpm -ivh cpdup-*.rpm