Table of Contents
备份
备份到远程ssh目录
# 挂载远程ssh目录
sudo sshfs [email protected]:/home/kali /home/partimag
# 备份
sudo /usr/sbin/ocs-sr -q2 -c -j2 -z9p -i 0 -sfsck -senc -p choose savedisk 2024-03-02-13-img sda
备份到本地磁盘
# 挂载保存镜像文件的磁盘目录到本地目录/home/partimag
sudo mount /dev/sdb1 /tmp/xxx
sudo mount --bind -o noatime /tmp/xxx/xxxx /home/partimag
# 备份
sudo /usr/sbin/ocs-sr -q2 -c -j2 -z9p -i 0 -sfsck -senc -p poweroff savedisk autoname sda
还原
从远程ssh目录中的镜像还原到磁盘
# 挂载远程ssh目录
sudo sshfs [email protected]:/home/kali /home/partimag
# 恢复系统
sudo /usr/sbin/ocs-sr -g auto -e1 auto -e2 -r -j2 -c -k0 -p reboot restoredisk 2024-03-02--13-img sda
从本地磁盘镜像文件恢复
# 挂载保存镜像文件的磁盘目录到本地目录/home/partimag
sudo mount /dev/sdb1 /tmp/xxx
sudo mount --bind -o noatime /tmp/xxx/xxxx /home/partimag
# 恢复系统
sudo /usr/sbin/ocs-sr -g auto -e1 auto -e2 -r -j2 -c -k0 -p reboot restoredisk 2024-03-02--13-img sda
参考资料
https://clonezilla.org/advanced/reserved-word-ocs-sr.php