On 08/22/2014 03:23 AM, Dirk Gently wrote:
If you're going to dump it to an empty disk, use rsync.
+1. No, wait +10^23
This will do several things -- if there are logical block errors on the target disk, the rsync will be more robust. 2: the rsync copy will be fully defragged and spatially compacted (files in the same directory will be together).
All very true But the real point is that rsync is a tree walker whereas dd is there to copy on a single file.
dd will be faster, but the copied image will be of lower quality.
Implied in that is that the image being copied is of the raw disk, a binary blob, and not a sequence of files. It is copied byte for byte including all the sector by sector layout. Three is no compacting, handling of errors is primitive and on the while they will simply be replicated and may even cause dd to abort. Directories will not be compacted. Same with copying back.
dd will take about 30% to 50% as much time as the rsync solution, but when your restore your files to the new installation, the rsynced filesystem can be rsynced back to your new system much faster than rsyncing a dd'ed copy.
And copying back may not work. a dd of a raw disk assumes that the target has similar characteristics to the source. It may work better with a primitive file system than more modern ones, but I'm not sure of even that. IF, perhaps, you were dd'ing a raw disk off to store and then replacing the original source with an identical disk, then I'd have a degree of confidence. I said that dd is a wrong headed solution here. I stand by that. Whatever Dirk has to say about speed/efficiency, the original idea of backup-restore while replacing a disk is better carried out with something like rsync. All in all I'd recommend rsync over tar or find/cpio since it is more modern and more flexible. I have myself done things similar to what the OP was proposing, so can heartily recommend rsync. Dd is a wonderful tool but its not the tool that should be used here. -- Tortoise: 'How many talking tortoises have you met?' Brutha: 'I don't know.' Tortoise: 'What d'you mean, you don't know?' Brutha: 'Well, they might all talk. They just might not say anything when I'm there.' -- "Small Gods", Terry Pratchett -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org