You are not logged in.

#1 2017-01-02 15:27:56

hybrid
Member
Registered: 2007-02-05
Posts: 261

checking files after migration to new hdd

Hi there,

I'm about to get a new hdd so I'll move my /home (well and /var) to it.
In the past I've mostly used tar and sometimes just cp to do the job, but over the years some (very few) files got corrupted.
So I'm looking for a practical way to compare the copied files with the original files. The old /home is on ext3, the new one will get ext4.

The easiest way I can think of would probably be to use rsync (copy everything, then run rsync --checksum), not sure how great/sufficient that works.
I mean I could also use find+shasum on the old and new file systems and then sort+diff the lists, but that feels quick and dirty plus I'm not sure how practical this is on a ~2TB  /home partition.
I'm not doing anything overly fancy with this machine, this is just my home computer. So I guess md5sum would be enough.

Anyhow, how do you check your data after a migration? There must be more sophisticated ways than my quick'n'dirty ones I just mentioned.


Thanks in advance

Last edited by hybrid (2017-01-02 15:29:35)

Offline

#2 2017-01-02 15:52:48

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: checking files after migration to new hdd

I'd just use rsync in the first place.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2017-01-05 17:07:50

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: checking files after migration to new hdd

Transfer with rsync, then run rsync -c to verify.

http://unix.stackexchange.com/a/66702

Offline

#4 2017-01-06 05:03:06

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: checking files after migration to new hdd

I find cfv to be very handy for generating checksums and verifying files.

Not an installation issue, moving to GNU/Linux Discussion.

Offline

Board footer

Powered by FluxBB