# dump 0 -aLf /mnt/home.dmp /home
# cd /tmp # restore -xf /mnt/home.dmp /home/user1/ ... Specify next volume #: 1 set owner/mode for '.'? [yn] y # ls /tmp/home/user1/ # restore -if /mnt/home.dmp restore > cd home restore > add user1 restore > extract ... Specify next volume #: 1 set owner/mode for '.'? [yn] y restore > quit # ls /tmp/home/
# cd /home # restore -rf /mnt/home.dmp
part mount util file size a / dump root.dmp 138Mb d /var/ dump var.dmp 34Mb e /usr/ tar usr.tgz 230Mb (без /usr/ports)
[hostX:~] # rsh -l uX gZ "touch root.dmp" [hostX:~] # dump 0 -aLf uX@gZ:root.dmp / DUMP: Connection to gZ.class established. ... DUMP: DUMP IS DONE [hostX:~] # rsh -l uX gZ "touch var.dmp" [hostX:~] # dump 0 -aLf uX@gZ:var.dmp /var DUMP: Connection to gZ.class established. ... DUMP: DUMP IS DONE [hostX:~] # cd /usr [hostX:/usr] # tar –czvf - --exclude ports/ . | rsh -l uX gZ "cat > usr.tgz"
При использовании FreeBSD livefs диска выбираем пункты меню:
"Fixit" -> CDROM/DVD -> Alt-F4
При использовании frenzy livecd в процессе загрузки указываем опцию
nohdd
Fixit# ifconfig rl0 inet 10.10.106.X/24 Fixit# ping 10.10.106.Z ...
Добавляем упоминание сервиса rsh в файл /etc/services
Fixit# cat >> /etc/services shell 514/tcp <Ctrl>-D
Используем sysinstall вместо утилит fdisk, bootmgr, bsdlabel и newfs
Fixit# sysinstall Configure Fdisk C - Create Slise S - Set Bootable W - Write changes BootMgr Quit Exit Exit Install Fixit# /stand/sysinstall Configure Label C - Create 500M FS /mnt/a (will be "/") S - Toggle Softupdates C - Create 500M FS /mnt/b C - Create 3G FS /mnt/d (will be "/usr") C - Create FS /mnt/e (will be "/var") W - Write Q - Finish Exit Exit Install Fixit# mount /dev/md0 on / (ufs, local) devfs on /dev (devfs, local) /dev/acd0 on /dist (cd9660, local, read-only) /dev/ad0s2d on /mnt/a (ufs, local) /dev/ad0s2e on /mnt/b (ufs, local, soft-updates) /dev/ad0s2f on /mnt/d (ufs, local, soft-updates) /dev/ad0s2g on /mnt/e (ufs, local, soft-updates)
Fixit# cd /mnt/a Fixit# restore -rf uX@10.10.106.Z:root.dmp
При необходимости можно откорректировать востановленные файлы конфигурации
Fixit# ee /mnt/a/etc/rc.conf Fixit# ee /mnt/a/etc/fstab
Fixit# cd ../e Fixit# restore -rf uX@10.10.106.Z:var.dmp
Fixit# cd ../d Fixit# rsh -l uX 10.10.106.Z "cat usr.tgz" | tar -xvf –
Fixit# umount /mnt/a Fixit# umount /mnt/b Fixit# umount /mnt/d Fixit# umount /mnt/e Fixit# bsdlabel ad0s2 # /dev/ad0s2: 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: 10474317 0 unused 0 0 # "raw" part, don't edit d: 1024000 0 4.2BSD 2048 16384 64008 e: 1024000 1024000 4.2BSD 2048 16384 64008 f: 6291456 2048000 4.2BSD 2048 16384 28552 g: 2X4861 8339456 4.2BSD 2048 16384 28552 Fixit# EDITOR=ee
Редактируем имена разделов
Fixit# bsdlabel -e ad0s2 # /dev/ad0s2: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 1024000 0 4.2BSD 2048 16384 64008 b: 1024000 1024000 4.2BSD 2048 16384 64008 c: 10474317 0 unused 0 0 # "raw" part, don't edit d: 6291456 2048000 4.2BSD 2048 16384 28552 e: 2X4861 8339456 4.2BSD 2048 16384 28552
Fixit# sysinstall Configure Fdisk Set bootable Write Boot Manager Exit Exit Install Reboot in new system: Fixit# exit