Xu Xiaodong avatar Xu Xiaodong committed 7b1cced

initial commit

Comments (0)

Files changed (4)

+用途:
+=====
+
+利用 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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.