Rsync
Excluded from delete on receiver side
rsync --del --filter='-r_/important' <source> <dest>
Estimate mirror size
# Example
$ rsync -h --recursive -n --stats rsync://ftp.lysator.liu.se/pub/fedora/linux/development/37/Everything/x86_64/os/
...
Number of files: 66,900 (reg: 66,856, dir: 44)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 0
Total file size: 98.46G bytes
Total transferred file size: 0 bytes
Literal data: 0 bytes
Matched data: 0 bytes
File list size: 3.74M
File list generation time: 0.077 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 171
Total bytes received: 3.78M
sent 171 bytes received 3.78M bytes 35.83K bytes/sec
total size is 98.46G speedup is 26,044.63 (DRY RUN)
Tar alternative
For initial copies where the destination is empty, using tar
instead of rsync
can provide a speed advantage here:
cd /source
time tar cf - * | (cd /destination/; tar -xvf -)