Commits

Xu Xiaodong  committed 7b1cced

initial commit

  • Participants

Comments (0)

Files changed (4)

File README.markdown

+用途:
+=====
+
+利用 ucloner 备份/还原 ubuntu 系统.
+
+用法:
+=====
+
+双击 run_bak.sh 或 run_res.sh 执行即可.
+#!/bin/sh
+#
+# description:  利用 ucloner 还原 ubox 系统
+# author:       Xu Xiaodong <xxdlhy@gmail.com>
+# modified:     2011 Jun 14
+#
+
+BASE_PATH=$HOME/ucloner
+PROG=$BASE_PATH/program
+IMAGE=$BASE_PATH/ubox.squashfs
+
+cd $PROG
+
+case "$1" in
+  backup)
+    sudo ./ucloner_cmd.py mode=backup backup_to=$BASE_PATH/$(date +%Y-%m-%d).squashfs
+    ;;
+  restore)
+    sudo ./ucloner_cmd.py mode=restore restore_from=$IMAGE /=/dev/sda1 /_fs=ext4 grubdev=/dev/sda
+    ;;
+  *)
+    echo "$0 <backup | restore>"
+    exit
+    ;;
+esac
+
+if [ $? -eq 0 ]; then
+  echo '已成功备份/还原系统. [OK]'
+fi
+#!/bin/sh
+#
+# description:  利用 ucloner 还原 ubox 系统
+# author:       Xu Xiaodong <xxdlhy@gmail.com>
+# modified:     2011 Jun 14
+#
+
+./resbox backup
+sleep 1h
+#!/bin/sh
+#
+# description:  利用 ucloner 还原 ubox 系统
+# author:       Xu Xiaodong <xxdlhy@gmail.com>
+# modified:     2011 Jun 14
+#
+
+./resbox restore
+sleep 1h