Partclone
外观
Partclone 像著名的 Partimage 一样,可以用来备份和恢复分区,并且只考虑已使用的块。
安装
使用 Partclone 处理 ext4 格式的分区
不压缩
不压缩备份
# partclone.ext4 -c -s /dev/sda1 -o ~/image_sda1.pcl
恢复它
# partclone.ext4 -r -s ~/image_sda1.pcl -o /dev/sda1
压缩
压缩备份
# partclone.ext4 -c -s /dev/sda1 | lz4 -z > ~/image_sda1.pcl.lz4
提示 要实现最大程度的压缩,请使用
lz4 -z -12,或者尝试其他 压缩工具。恢复它
# lz4 -d -c ~/image_sda1.pcl.lz4 | partclone.ext4 -r -o /dev/sda1