3

I'm looking for a fast and reliable way to move some chosen directories from one HDD to another.

The case is as follows. I'm getting a new desktop system which will replace my old desktop. I want to migrate a couple of directories from the old system to the new system and I'm quite concerned about the integrity of the data. The amount of data I want to migrate is >300 GB. This might take a while to move even over 1000 Mbit/s Ethernet, so I figure the fastest way is to unplug the HDD of the old desktop (it's connected via SATA) and plug it into the new system and cp the data to the new system's HDD.

My question: Is this the best and most reliable way to proceed? If not, how should I proceed? Maybe I'm better off using rsync? I would also want to know how any solution handles permissions and how it preserves the integrity of the data.

1

1 Answer 1

2

I'd personally trust rsync to do the job (with -arvx flags - archive, recursive, verbose and one-filesystem) but if you need something extra:

sha256sum <(find ./original_path/ -type f -exec sha256sum {} \; | sort) | cut -d' ' -f1
# Should output something like:
# dbda116eaa459cee10b25765202c37d40b9371df52afb2ad202b13327760b251

# copy your files to ./new_path/
# Something like: rsync -arvx ./original_path/ ./new_path/

sha256sum <(find ./new_path/ -type f -exec sha256sum {} \; | sort) | cut -d' ' -f1
# Should also output:
# dbda116eaa459cee10b25765202c37d40b9371df52afb2ad202b13327760b251

If you're not happy with rsync, you could always tar up the files and extract them in the new location. I'd recommend checking their integrity with a similar method as above, if they're really important.

1
  • Man page says "archive mode; equals -rlptgoD (no -H,-A,-X)". That would make -avx sufficient flags?
    – N.N.
    Jul 15, 2011 at 17:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .