migrate lxc container to ganeti
[sysadmin-cookbook] / recepies / ganeti / migrate-lxc / 7-lxc-stop-container.sh
diff --git a/recepies/ganeti/migrate-lxc/7-lxc-stop-container.sh b/recepies/ganeti/migrate-lxc/7-lxc-stop-container.sh
new file mode 100755 (executable)
index 0000000..6e7ab64
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh -x
+
+. ./0-host.sh
+. ./0-lxc.sh
+
+ssh_lxc /etc/init.d/lxc-watchdog stop $host
+
+ssh_lxc rm -v /var/lib/lxc/$host/on_boot
+
+ssh_lxc rsync -ravH --numeric-ids --sparse --delete --exclude /tmp --exclude /var/tmp /mnt/$host/ 10.60.0.112:/tmp/$host/