Re: Partition kopieren
Hallo,
das geht auch ganz gut mit tar. Dabei brauchst du nicht darauf achten, daß die
Partitionsgrößen übereinstimmen (wie bei dd). Anbei mein script dazu. Ich
mache gelegentlich damit eine Kopie der root Partition und kann dann ganz
entspannt neue Software testen.
Gruß
Reiner
> Hallo!
> Ich habe vor, mir eine neue Festplatte zu kaufen. Nun Frage ich mich, ob
> ich mein Debian Woody einfach so auf die neue Platte kopieren kann? Das
> ich dann den Bootmananger umkonfigurieren muss, ist mir klar, aber muss
> ich sonst noch was machen oder geht das überhaupt nicht? Mit welchem
> Programm kopier ich das dann am besten rüber?
> Gruss
> David
-- copy_root.sh --
#!/bin/bash
press_any_key() {
echo
echo "Press any key to continue if everything is ok" ; read
}
SOURCE=/
TARGET=/mnt/hda7
cat <<EOF
# This script copies the contents of $SOURCE to $TARGET
#
# Preparation steps (To be done manually)
#
# 1) Delete contents of target file system ($TARGET)
# 2) Execute this batch using the 'script' command.
#
EOF
press_any_key
echo "START: "`date`
nice -n 19 tar cf - --directory=$SOURCE --one-file-system $SOURCE | tar xf -
--directory=$TARGET
echo "END: "`date`
cat <<EOF
# Completion steps (To be done manually)
#
# 1) Edit $TARGET/etc/fstab to change root mount to copy
# 2) run 'lilo -v -t' to check changes on boot loader and finally
# 3) run 'lilo -v' to update boot loader.
#
EOF
Reply to: