FreeBSD System Backup Methods2 mini install & tar restore

Methods2
if u can install new system in local , it will easy restore system , so fast.

1、backup old system

tar -zcvpf /tmp/backup.tar.gz --exclude=/proc --exclude=/home --exclude=/compat --exclude=/sys --exclude=/mnt --exclude=/tmp --exclude=/lost+found /

2、install mini new system

Filesystem Size Used Avail Capacity Mounted on
/dev/da0s1a 6.3G 2.1G 3.8G 36% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/da0s1e 1.7G 12K 1.6G 0% /tmp
/dev/da0s1d 6.3G 33M 5.8G 1% /var

/ /dev/da0s1a
/var /dev/da0s1d
/tmp /dev/da0s1e
swap /dev/da0s1b

3、old system mount new mini system

mount /dev/da0s1a /tmp/da1
mount /dev/da0s1d /tmp/da1/var

Restore:
cd /tmp/da1
tar -zxvpf /tmp/backup.tgz
ln -s /usr/home /home

FreeBSD System Backup Methods1

Best Regards
========================
Lani

Posted in 標籤: |

0 意見: