PROBLEM: same data differente Bytes
-
- Posts: 6
- Joined: 2019/08/08 10:37:32
PROBLEM: same data differente Bytes
Hi,
I copy some directories from server 1 to server 2 with rsync -avr .
When I check if there are differences between source data and destination data with du -s the values are always difference, for example the source directory is 231349343 while the destination is 231337264.
Why are there this little difference?
Is there any better command to verify the consistence between source and destination?
Thank you so much.
Best regards.
Riccardo
I copy some directories from server 1 to server 2 with rsync -avr .
When I check if there are differences between source data and destination data with du -s the values are always difference, for example the source directory is 231349343 while the destination is 231337264.
Why are there this little difference?
Is there any better command to verify the consistence between source and destination?
Thank you so much.
Best regards.
Riccardo
-
- Posts: 83
- Joined: 2019/08/07 01:50:24
- Location: Perth, Australia but originally from Carshalton, Surrey
Re: PROBLEM: same data differente Bytes
Can you do this on both systems? `filename` is the name of the file you're copying.
1.
2.
The command in point 1 is one good way to determine that your file is the same on both systems.
1.
Code: Select all
sha256 filename
Code: Select all
lsblk -f
Re: PROBLEM: same data differente Bytes
You're using rsync -av. It already verifies the data.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 6
- Joined: 2019/08/08 10:37:32
Re: PROBLEM: same data differente Bytes
Hi Tony,tony_down_under wrote: ↑2019/08/08 11:25:23Can you do this on both systems? `filename` is the name of the file you're copying.
1.2.Code: Select all
sha256 filename
The command in point 1 is one good way to determine that your file is the same on both systems.Code: Select all
lsblk -f
Thank you. Now I test these solutions.
Best regards
Riccardo
I can't use sha256sum with directories but only with files. Are there any command to check folders?
Re: PROBLEM: same data differente Bytes
"du" shows disk usage. Disk space is allocated in blocks. If the filesystem block sizes differ between the two systems, disk usage may differ between the systems. Try your "du" command with the "-b" option.
-
- Posts: 83
- Joined: 2019/08/07 01:50:24
- Location: Perth, Australia but originally from Carshalton, Surrey
Re: PROBLEM: same data differente Bytes
Thanks for this info! My thought process was may be the filesystems were different formats in each. I didn't think about block sizes at the time. I'll also remember this
Good info!
Re: PROBLEM: same data differente Bytes
I'm going to hate myself in the morning, BUT... I see you have taken a "Byte" out of Crime"Riccardo1987 wrote: ↑2019/08/08 10:48:12Hi,
I copy some directories from server 1 to server 2 with rsync -avr .
When I check if there are differences between source data and destination data with du -s the values are always difference, for example the source directory is 231349343 while the destination is 231337264.
Why are there this little difference?
Is there any better command to verify the consistence between source and destination?
Thank you so much.
Best regards.
Riccardo
McGruff the Crime Cat
P.S. The DEVIL made me do it -- REALLY!!!