RE: How to migrate a Debian system to another hard drive?
On Wed, 4 Sep 1996, Guy Maor wrote:
> > u can also do it with `cp` - i did that (even moved my /dev)
> cp -a is the easiest way to duplicate something.
> -a, --archive
> Preserve as much as possible of the structure and
> attributes of the original files in the copy. The
> same as -dpR.
Nono no no... please don't rely on such features of GNU software. This
will NOT work with a generic cp on other systems. Please use either a
piped tar or a cpio,afio or whatever else. The cp method mentioned above
is definitely not the way to solve such general unix administration tasks.
find -not -regex "^\./desireddir/.* -not -regex "^\./mnt/.*" | afio -p
or with the more widely used cpio
'find . -depth | cpio -pdmv /target_directory'
where target_directory is your mounted new partition.
This procedure even works over network connection WITHOUT the use of NFS
if your'e using rsh and named pipes. Thus the usage of tapedrives on
another machine is possible.
PGP Key fingerprint = 65 18 4E 37 BA F7 4D 67 39 F2 DE F7 99 37 BA 00
PGP Key is available under : http://www.xlink.net/~steffen/steffen.asc
Steffen R.Mueller __ ___ _ _ email: firstname.lastname@example.org
NTG Netzwerk und Telematic GmbH \ \/ / (_)_ __ | | __ fax : +49 721 9652 210
Geschaeftsbereich Xlink \ /| | | '_ \| |/ / phone: +49 721 9652 211
Vincenz-Priessnitz-Str. 3 / \| | | | | | < RIPE : SM25-RIPE
D-76131 Karlsruhe, Germany /_/\_\_|_|_| |_|_|\_\ WWW.Xlink.net/~steffen
INTERNET. MIT SICHERHEIT