RSync / compare?

Quick question about rsync results - and comparing file structure/etc.

I am migrating about 2TB of data from one server to another.  The rsync completed this morning - and when I go to the old server - and do a disk usage check on the old server/compare it to the new server - there's about a 2GB discrepancy.

There are literally thousands of files on the system...  Is there any way to do an easy/effective comparison to see what is the cause of the discrepancy?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rsync --size-only --list-only
diff the output of du on both machines.
erzoolanderAuthor Commented:
I haven't used those tags before with rsync (kind of an rsync noob).

So would the command go like:

rsync --size-only --list-only ssh /newdir/


It's giving me an error on that :)
Gerwin Jansen, EE MVETopic Advisor Commented:
Take the rsync command you had and add: --dry-run
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

What was your rsync command?  Which had a bigger size?  Did you use the -l option to force the copy of symlinks as links, otherwise, they may just expand the files.

You can find try finding the symlinks in each tree to see if they match

find -L /PATH/ -type l

Open in new window

Try this
rsync -avHc --dry-run ssh /newdir/

Open in new window

This should list the files that are different, if any.

-a               archive mode
-v               verbose
-H              preserve hard links
-c               checksum
--dry-run  actions simulated

I got this from this forum, it just so happened I needed this recently.
erzoolanderAuthor Commented:
rsync -avzhe ssh /localdestination/

is the command I used.
erzoolanderAuthor Commented:
The dry run command doesn't seem to really do much - except show me the entire list of files (which is odd - because I would've thought it ought be incremental...meaning...files that have transferred ought not show).  I know they're there on the destination location - because I can see them.  So ought they not have been omitted from the dry run?
Gerwin Jansen, EE MVETopic Advisor Commented:
rsync --dry-run -avzhe ssh /localdestination/

will show you a list of files, yes. It is showing you the files that still need to be copied. You can also add --itemize-changes to just get the incremental file list in a somewhat different format:

rsync --dry-run --itemize-changes -avzhe ssh /localdestination/

this is exactly showing your discrepancies.

Try with a smaller folder first if you like, rsync that folder, remove one file on the destination and then run again with the --dry-run --itemize-changes options added.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
add --stats to the comand to get statistics at the end so you can compare easily with numbers

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.