[CentOS-mirror] Rsync command line (hard links)
avij at centosproject.org
Fri Jun 22 14:40:10 UTC 2018
Cochrane, Bryan T kirjoitti 22.6.2018 klo 14.46:
> rsync -ah --stats --delete eu-msync.centos.org::CentOS /bak/centos/CentOS
I believe you can sync OK now, but a comment on this command line.
rsync's -h option is "output numbers in a human-readable format". While
that may be nice for logging purposes and such, I would recommend adding
the -H option as well. -H is "preserve hard links", which is
particularly useful at point release times.
For a slightly simplified example, 6.9's rpms take up around 8 GB of
disk space. The updated packages in the upcoming 6.10 take up around 1
GB. If your rsync does not use that -H option, you will need to download
around 8 GB of 6.10 packages when 6.10 gets released. If you have -H
enabled, you will need to download only that 1 GB of fresh 6.10
packages. The remaining unchanged packages (around 7 GB) will be hard
linked between 6.9 and 6.10, and transferring this hard link information
is very quick.
Each hard linked file needs to be stored on disk only once, saving you
some hard disk space.
If you (or any others reading this message) don't have -H in your rsync
command line, please add it. The next time you sync your mirror, rsync
will remove the duplicate files and create hard links for them.
In certain rare situations the underlying file system does not
understand hard links. In this case the -H flag won't help.
More information about the CentOS-mirror