代码: 全选
sudo tar -czvpf /home/用户名/back/20091018.gz / --exclude=/home/用户名/* --exclude=/var/cache/pacman/pkg/* --exclude=/mnt --exclude=/tmp --exclude=/proc/*
用tar备份过的朋友可否把备份恢复命令贴出来看看?谢谢!
代码: 全选
sudo tar -czvpf /home/用户名/back/20091018.gz / --exclude=/home/用户名/* --exclude=/var/cache/pacman/pkg/* --exclude=/mnt --exclude=/tmp --exclude=/proc/*
tar: /sys/devices/pci0000\:00/0000\:00\:00.0/msi_bus:文件缩小 4096 字节;用零填充
tar: /sys/devices/pci0000\:00/0000\:00\:00.0/remove:无法 open: 权限不够
tar: /sys/devices/pci0000\:00/0000\:00\:00.0/rescan:无法 open: 权限不够
/sys/devices/pci0000:00/0000:00:00.0/subsystem
/sys/devices/pci0000:00/0000:00:00.0/power/
/sys/devices/pci0000:00/0000:00:00.0/power/wakeup
tar: /sys/devices/pci0000\:00/0000\:00\:00.0/power/wakeup:文件缩小 4095 字节;用零填充
/sys/devices/pci0000:00/0000:00:00.0/config
/sys/devices/pci0000:00/0000:00:00.0/resource2
tar: /sys/devices/pci0000\:00/0000\:00\:00.0/resource2:读入 32 字节时,在 0 字节处发生读错误: 输入/输出错误
/sys/devices/pci0000:00/0000:00:00.0/resource3
tar: /sys/devices/pci0000\:00/0000\:00\:00.0/resource3:读入 2560 字节时,在 0 字节处发生读错误: 输入/输出错误
代码: 全选
tar -czvpf ~/back/20091018.gz / --exclude=~/back --exclude=/var/cache/pacman/pkg/* --exclude=/mnt --exclude=/tmp --exclude=/proc/* --exclude=/media --exclude=/sys --exclude=~/Downloads/* --exclude=~/音乐/* --exclude=~/pkg/* --exclude=~/shiyan --exclude=~/wendang --exclude=~/SD --exclude=~/费用 --exclude=~/.rmvb1 --exclude=~/.mldonkey/incoming/files/* --exclude=~/.mldonkey/temp/* --exclude=~/.mldonkey/torrents/downloads --exclude=~/.VirtualBox/HardDisks/* --exclude=~/.evolution --exclude=~/.wine/drive_c/Download/* --exclude=~/.wine/drive_c/Downloads/*
tar xzvf shiyan.gz /home/user/shiyan/
tar: /home/user/shiyan:归档中找不到
tar: 由于前次错误,将以上次的错误状态退出
汗!在网上淘的,貌似错了要恢复你的系统建议用live cd启动一个llinux系统,打开一个终端,执行如下的命令:
cd /mnt
mkdir new
mkdir back
mount /dev/hda6 /mnt/new
mount /dev/hda7 /mnt/back
tar xzvpf system.tgz /mnt/new
恢复备份命令是
tar xzvf system.tgz /mnt/new