OpenVZ Forum - RDF feed
type: channel
items: Copy To Container From Host
items: Re: Copy To Container From Host

Copy To Container From Host
type: item
description: Hi, Probably a silly question, but I was wondering if it is possible to copy a file to/from a Host to a Container (to save bandwidth). Many thanks in advance, Brendan
creator: bcdsystems
date: 2009-12-28T12:23:33-00:00

Re: Copy To Container From Host
type: item
description: Hi, Just figured out I can do this as follows cat file | vzctl exec 201 "cat - > file" and vzctl exec 201 "cat file" > file I guess my question is, is there a command to do this specifically? Or a better way of doing this? Thanks,
creator: bcdsystems
date: 2009-12-29T10:37:59-00:00

Re: Copy To Container From Host
type: item
description: if container is running you can edit,copy,move files in root/[CTID]/ if container is not running you can edit,copy,move files in private/[CTID] but then, keep in mind that containers quota information will be incorrect until you drop container quota information (it will be recreated and recalculated in next CT start, it is a little bit time consume operation) to drop container quota: vzquota drop CTID
creator: Paparaciz
date: 2009-12-29T11:45:19-00:00

Re: Copy To Container From Host
type: item
description: Thanks, that's great. Just what I wanted to know. Just to clarify, does the comment re the quota information apply to the copy,edit etc only when the container isn't running. So if done as suggested when the container is running, the quota will still be OK?
creator: bcdsystems
date: 2009-12-29T12:07:28-00:00

Re: Copy To Container From Host
type: item
description: when container IS running then you work with root/CTID quota information should be ok when container IS NOT running then you work with private/CTID you lost correct quota information, then you have to drop quota info
creator: Paparaciz
date: 2009-12-29T12:18:10-00:00

Re: Copy To Container From Host
type: item
description: Great. Once again, many thanks for your help.
creator: bcdsystems
date: 2009-12-29T12:20:38-00:00