OpenVZ Forum


Home » General » Support » Accidentally destroyed container
Accidentally destroyed container [message #44387] Mon, 05 December 2011 19:54 Go to next message
phl1p is currently offline  phl1p
Messages: 3
Registered: December 2011
Junior Member
Hello,

i have accidentally executed a "vzctl destroy veid".

I can still find most of my files in a directory like this one: /var/vztmp/vzctl-rm-me.XBY8XzO/

Some directories are missing, for example /usr/bin is gone.

How can I "recover" from that state?

regards & thanks in advance




Re: Accidentally destroyed container [message #44419 is a reply to message #44387] Tue, 06 December 2011 21:50 Go to previous messageGo to next message
flashweb is currently offline  flashweb
Messages: 9
Registered: July 2009
Junior Member

I have done this before. Vzctl should work for confirmation before deleting a vps.

I don't think there is a way to recover. You need to restore data from backup if you have one.
Re: Accidentally destroyed container [message #44433 is a reply to message #44419] Wed, 07 December 2011 12:06 Go to previous messageGo to next message
phl1p is currently offline  phl1p
Messages: 3
Registered: December 2011
Junior Member
Thanks for your reply flashweb,

yes a confirmation dialog would have helped a lot here.

I think the "destroy" phrase is not fitting so well. I have been using KVM before i switched to OpenVZ and there "destroy" is meant to make a hard "power off" of a virtual machine in case it is hung.

Thats what made me execute "vzctl destroy" without reading the man page Wink

After this little accident i have searched for informatoins about vzctl and found out that "destroy" was called "delete" in the past...

So if someone else has an idea, of how a recover could be possible, please don't wait to give me some hint Smile I still have a backup of the destroyed Container.

I will start from scratch now.
Re: Accidentally destroyed container [message #44444 is a reply to message #44387] Wed, 07 December 2011 18:29 Go to previous messageGo to next message
Ales is currently offline  Ales
Messages: 330
Registered: May 2009
Senior Member
Look at this as an equivalent of deleting the directory full of files and other dirs. You have about as much chances of getting the contents back, unless you have backups.

On the other hand, if you have a backup of the entire VM, that's all you need. The backup of the .conf file should still be there too (check within /etc/vz/conf for backups according to your deleted VM id).

Re: Accidentally destroyed container [message #44445 is a reply to message #44387] Wed, 07 December 2011 20:24 Go to previous messageGo to next message
phl1p is currently offline  phl1p
Messages: 3
Registered: December 2011
Junior Member
Ales,

yes you'r right. the conf file still exist. But what i meant was:

i have a backup of the container in its destroyed state (that leftover in the /var/vztmp/ directory). But unfortunately not in a healthy state. At least not a recent one.

recover suggestions are still welcome Wink

cheers
Re: Accidentally destroyed container [message #44589 is a reply to message #44387] Fri, 16 December 2011 04:25 Go to previous message
weddingcoo is currently offline  weddingcoo
Messages: 1
Registered: December 2011
Location: California
Junior Member

Thanks for your reply flashweb,
Embarassed
Previous Topic: create openvz container
Next Topic: Sound in Virtual machine
Goto Forum:
  


Current Time: Sun Jul 21 03:26:52 GMT 2024

Total time taken to generate the page: 0.02338 seconds