Also, it has been reported that even with the -a flag, some extended attributes may not be copied.
Can i ask why use reync for this task instead of a simple cp -ax?
See note https://wiki.archlinux.org/index.php/Di … g#Using_cp
A bit OT, but can you verify the factual accuracy of 'As a cp alternative' section of https://wiki.archlinux.org/index.php/Tar ?
-edit
I did it one month ago without issues, and online.
to copy (say) sda to sdc, i first partitioned and formatted sdc with a partition scheme similar to sda.
then i mounted sdc:
mount /dev/sdc1 /tmp/sdc1
mount /dev/sdc2 /tmp/sdc2
mount /dev/sdc3 /tmp/sdc3
then i cpied:
cp -axv /boot/* /tmp/sdc1/
cp -axv / /tmp/sdc3/
...and so on
All is working right now
The pros over dd are that you can (moderately) do this online and is of course safer.
The cons over dd are that you have to install the bootloader
But again, why rsync in this case?
There is even the "--update" switch on cp...
I hope my arch live cd has smartctl on it...
smartmontools should be included: https://projects.archlinux.org/archiso. … kages.both
]]>I hope my arch live cd has smartctl on it...
]]>But, (ewaller gets out his soapbox) BE VERY CAREFUL WHEN USING dd. These forums are riddled with tales of woe in which data were copied to the wrong destination, obliterating the critical data that had lived in that location. dd is a dangerous command. I speak from experience.
]]>I have actually two disks in my desktop, sda and sdb, and I want to copy sda to sdc. sda and sdc have the exact same size, and I want sdc to get the exact same bytes, MBR, etc... So I think dd is quite alright in this situation, right?
I want to copy disks, not copy "/" which is a combination of two disks and possible other mounted stuff...
Yeah, dd is fine in this situation.
]]>I want to copy disks, not copy "/" which is a combination of two disks and possible other mounted stuff...
]]>And, as karol said, rsync is the better tool for this job.
]]>When copying the disk with the OS on it to another equally sized disk with:
dd if=/dev/sda of=/dev/sdc bs=4096 conv=notrunc,noerror
Then a problem is that, possibly, during the 3 hours that this copy takes (for 1TB at 100MB/s), the disk sda may change due to other activity you're doing during the copy. So you end up with sdc having some combination of older and newer things, or maybe even a file that is half changed because it changed exactly during the time it was being copied.
So I should do this at night instead while not using the computer. But, the question is: could Linux still do activity that alters the disk while not using the computer?
Would KDE do stuff? When instead booting to terminal and no graphical desktop, are there then still potential things that might change the disk? What's the most reliable way of making an identical copy of your OS disk?
Reason: I discovered the disk in my desktop PC on which Linux is installed is compatible with a NAS I got, while an empty unused disk I have that I was planning to put in the NAS is not compatible with the NAS due to disk manufacturers putting crappy firmware on the disk on purpose to make you have to buy different disks for desktop and NAS/RAID. So I want to move everything of my desktop PC to the new disk so that I can use the old one for the NAS.
Thanks.
]]>