OpenVZ Forum


Home » General » Support » Copy data from container to host (Container has no net and botched os)
icon5.gif  Copy data from container to host [message #51015] Tue, 24 December 2013 06:22 Go to next message
bstriker is currently offline  bstriker
Messages: 4
Registered: December 2013
Junior Member
So my google foo is worthless on this topic.

Is there anyway to copy data from a container to the host?
I know you can copy data from the host to the container.

The os is pretty well botched with a few broken packages and no network
tried restoring the network but it has no default routes and I can't seem to add one.
So instead of wasting time to repair I'm hoping there is a clean cut way to just dump the data to the host and make a new container.

Any help is greatly appreciated. This is my first post.

[Updated on: Wed, 25 December 2013 08:57]

Report message to a moderator

Re: Copy data from container to host [message #51019 is a reply to message #51015] Tue, 24 December 2013 20:41 Go to previous messageGo to next message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
Can you be more specific about "The os is pretty well botched with a few broken packages and no network"??

what kernel and os in HN?
what os in CT?
why not to create new CT, install needed packages, move data?
Re: Copy data from container to host [message #51023 is a reply to message #51015] Wed, 25 December 2013 05:04 Go to previous messageGo to next message
bstriker is currently offline  bstriker
Messages: 4
Registered: December 2013
Junior Member
Thanks for the response. And sure, sorry for not being specific.

I'll try to fetch the kernel info if I get some time, but here's the basics.

It's a debian wheezy container on a debian wheezy host (proxmox 3 to be specific)
The system ran out of free HDD space during a package upgrade.
Some of the core packages like ls were broken. I tried clearing the package cache to increase space not thinking that I could just increase the HDD live. So now I can't do much other than console drop into it using vzctl enter. SCP would have been my first option to transfer data but no net.

[Updated on: Wed, 25 December 2013 05:07]

Report message to a moderator

Re: Copy data from container to host [message #51024 is a reply to message #51015] Wed, 25 December 2013 07:44 Go to previous messageGo to next message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
do it in HN.
Re: Copy data from container to host [message #51025 is a reply to message #51024] Wed, 25 December 2013 08:55 Go to previous messageGo to next message
bstriker is currently offline  bstriker
Messages: 4
Registered: December 2013
Junior Member
Paparaciz wrote on Wed, 25 December 2013 02:44
do it in HN.



Excuse me for being oblivious or ill-experienced but what is "HN" in this context?

And how would I go about "doing it in HN"?

[Updated on: Wed, 25 December 2013 08:56]

Report message to a moderator

Re: Copy data from container to host [message #51026 is a reply to message #51015] Wed, 25 December 2013 12:11 Go to previous messageGo to next message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
Hardware node, main server where you are creating containers
Re: Copy data from container to host [message #51027 is a reply to message #51025] Thu, 26 December 2013 00:31 Go to previous messageGo to next message
dipps is currently offline  dipps
Messages: 22
Registered: May 2013
Location: Out in the scrub
Junior Member
The HN (Hardware Node) is your Debian host. The one that boots from bare metal.

So get a shell prompt on the HN. Look in /var/lib/vz/private/CONTAINER_NUMBER

You'll see the files of the container. You can use the usual cp commands etc to copy files from the container to somewhere on the host. Or the other way, or onto another container.
Re: Copy data from container to host [message #51029 is a reply to message #51027] Fri, 27 December 2013 07:28 Go to previous message
bstriker is currently offline  bstriker
Messages: 4
Registered: December 2013
Junior Member
dipps wrote on Wed, 25 December 2013 19:31
The HN (Hardware Node) is your Debian host. The one that boots from bare metal.

So get a shell prompt on the HN. Look in /var/lib/vz/private/CONTAINER_NUMBER

You'll see the files of the container. You can use the usual cp commands etc to copy files from the container to somewhere on the host. Or the other way, or onto another container.



No homo but I love you. This is what I needed to know. Thanks!
Previous Topic: cpuunits #2
Next Topic: Bonding 2 nics and vlans works partly
Goto Forum:
  


Current Time: Tue Nov 12 15:13:05 GMT 2024

Total time taken to generate the page: 0.03190 seconds