ubuntu的备份和还原
ubuntu的备份和还原
dd
备份mbr
dd if=/dev/sda of=/backup/mbr.img bs=512 count=1
还原mbr
dd if=/backup/mbr.img of=/dev/sda bs=446 count=1
还原分区表,跳过主引导记录
dd if=/backup/mbr.img of=/dev/sda bs=1 count=64 skip=446 seek=446
GNU/TAR
备份
tar -cpzvf backup.tar.gz /media/usb/*
还原
tar -xpzvf backup.tar.gz -C /media/usb/
cpio
dump/restore
xfsdump/xfsrestore
备份
sudo xfsdump - /boot > backup.file
还原
sudo cat backup.file | xfsrestore - /boot
评论暂时关闭