OpenVZ Forum - RDF feed
type: channel
items: Copy data from container to host
items: Re: Copy data from container to host

Copy data from container to host
type: item
description: 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.
creator: bstriker
date: 2013-12-24T06:22:44-00:00

Re: Copy data from container to host
type: item
description: 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?
creator: Paparaciz
date: 2013-12-24T20:41:34-00:00

Re: Copy data from container to host
type: item
description: 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.
creator: bstriker
date: 2013-12-25T05:04:31-00:00

Re: Copy data from container to host
type: item
description: do it in HN.
creator: Paparaciz
date: 2013-12-25T07:44:39-00:00

Re: Copy data from container to host
type: item
description: 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"?
creator: bstriker
date: 2013-12-25T08:55:33-00:00

Re: Copy data from container to host
type: item
description: Hardware node, main server where you are creating containers
creator: Paparaciz
date: 2013-12-25T12:11:29-00:00

Re: Copy data from container to host
type: item
description: 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.
creator: dipps
date: 2013-12-26T00:31:33-00:00

Re: Copy data from container to host
type: item
description: 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!
creator: bstriker
date: 2013-12-27T07:28:02-00:00