On 4 March 2015, Manuel Giraud <man...@ledu-giraud.fr> wrote: > Ed Ahlsen-Girard <eagir...@cox.net> writes: > > > I decided to upgrade the internal drive, so I hooked up the new on on > > the CD's usual SATA channel and installed, having adjust the disklabel > > more to suit me (the auto partition of /usr left it really tight on > > space, and home was not big enough). > > > > First method: mount all the slices in /tree and run a series of cp -R > > as root. Files seemed to get there but something was not right with > > permissions when I tried booting the new disk, so I dropped back and > > did some research. > > For this kind of things, dump/restore is a good way too that won't mess > anything. AFAIK your differents source directories (/, /home, ...) have > to already be differents partitions, then you can go like this: > > # mount -o async /dev/sd?a /tree > # cd /tree > # dump -0a -f - / | restore -rf - > # mount -o async /dev/sd?d /tree/home > # cd /tree/home > # dump -0a -f - /home | restore -rf -
+1 for dump / restore. cp doesn't handle hardlinks, tar / pax have limitations on maximum path length, rsync is resource-hungry if you tell it to deal with hardlinks, and cpio has other limitations on file names. Really, dump / restore is the only viable choice for this kind of task. Regards, Liviu Daia