On 22.1.23. 22:06, Steve Fairhead wrote:
Hi folks,
I was cloning a server with rsync in preparation for a major upgrade (elderly
OpenBSD to 7.2). I noticed that the home partition usage was a good deal greater
on the new machine than the old (as seen by df).
After a lot of analysis, I found that all user folders (and all other
folders/partitions) were near-enough identical on both machines, except for one
- my boss's ;) . After more analysis, I found that it was his Maildir (using
dovecot) that was weird:
- Old machine: 49 GB
- New machine: 188 GB
Figures as measured with du -sk, which I realise is sector-oriented, but
still... And yes, my boss does a *lot* of email.
After yet more testing, I did a recursive copy of the old 49 GB Maildir to a
spare folder on the same home partition on the old machine. This came up, again,
as 188 GB.
(FWIW, Windows via Samba reported "140 GB; size on disk 204 GB" for both the
original "49 GB" Maildir and the 188 GB copy.)
I'm just puzzled, and clearly missing something. Can anyone enlighten me as to
the large (nearly 4*) discrepancy?
Thanks,
Steve
Since you have the same result after copying the files on the same machine,
I would say that some of them are sparse, and you didn't preserve that.
For openrsync, I searched the man page, and didn't find any mention of "sparse",
so I don't know how it handles them.
If you are using "original" rsync, try with -S flag.
Best regards,
Zeljko