Hi,
sometimes it would be great to have a recoverysystem for customers. In best
case, the customer will get the same ip in recoverymode, like in the normal
started ve.
As example:
We have a VID 1004 with the ip 192.168.0.123. This ve has been hacked, and the
customer should be able his data starting the ve 1004.
The solution is to create a new ve with the same ip. In this exampe we add
100000 to the vid 1004 = 1001004.
#stop ve 1004
vzctl stop 1004
#create a new ve with same ip:
vzctl create 1001004 --ipadd 192.168.0.123 --hostname recovery-blafoo
--ostemplate debian-6.0-amd64-minimal
#start that new ve
vzctl start 1001004
#mount the directories of defect ve to started recovery ve
mount -o bind /vz/private/1004/ /vz/root/1001004/mnt/
Now you can access the data of ve 1004 in ve's 1001004 /mnt directory. A chroot
to this directory is possible to: chroot /mnt/
To restart the normal ve, you have to unmount the directory first, stop and
destroy the ve:
umount /vz/root/1001004/mnt/
vzctl stop 1001004
vzctl destroy 1001004
vzctl start 1004
The recovery os template can be any template, but i think the best solution is,
to create an own little debian based template, which only ssh-server has
started.
Regards
Alex
Original issue reported on code.google.com by sera...@web.de on 21 May 2011 at 3:52
Original issue reported on code.google.com by
sera...@web.de
on 21 May 2011 at 3:52