Moving old data to new disks

As I wrote earlier this week one of my disks kept dying on me. The solution – of course – is to replace the faulty device with a brand-new one and move the data to the new disk.

While I had great success in doing so with Acronis True Image’s “Clone Disk” feature I had a little hickup while mounting the disk into the storage cage of my case. So for the time being I had to use the broken drive for another 2 days (don’t do this at home, kids!). As you can imagine the data became desynchronized and since I didn’t really have the time to clone the disk again I opted for another, more time saving method.

Everyone knows how to pack an entire system, store it somewhere in the network and restore it – all thanks to Linux live CDs and my good ol’ friend tar. tar is great for a lot of reasons: It processes .files, it keeps permissions and ownership intact… oh yeah, and it packs things.

So, this time I didn’t need to pack my entire system but only a few selected folders. And I didn’t really need to pack them either. But tar makes a great companion for moving sensitive data between disks, no less. Just start your machine in single user mode (or with a Live CD if you plan on moving your root partition around), mount target/destination, cd into the directory you want to move and use this nifty little command:

tar cd - . | (cd /my/new/home; tar xvpf -)

Yep, that’s all that is to it. Keeps all properties intact, which is important for, well, just about any kind of file/folder.

Published by

tsukasa

The fool's herald.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.