OpenVZ Forum


Home » General » Support » Copy To Container From Host
Copy To Container From Host [message #38509] Mon, 28 December 2009 12:23 Go to next message
bcdsystems is currently offline  bcdsystems
Messages: 8
Registered: May 2009
Junior Member
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
Re: Copy To Container From Host [message #38527 is a reply to message #38509] Tue, 29 December 2009 10:37 Go to previous messageGo to next message
bcdsystems is currently offline  bcdsystems
Messages: 8
Registered: May 2009
Junior Member
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,
Re: Copy To Container From Host [message #38529 is a reply to message #38527] Tue, 29 December 2009 11:45 Go to previous messageGo to next message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
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

Re: Copy To Container From Host [message #38530 is a reply to message #38529] Tue, 29 December 2009 12:07 Go to previous messageGo to next message
bcdsystems is currently offline  bcdsystems
Messages: 8
Registered: May 2009
Junior Member
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?
Re: Copy To Container From Host [message #38531 is a reply to message #38530] Tue, 29 December 2009 12:18 Go to previous messageGo to next message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
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
Re: Copy To Container From Host [message #38532 is a reply to message #38531] Tue, 29 December 2009 12:20 Go to previous message
bcdsystems is currently offline  bcdsystems
Messages: 8
Registered: May 2009
Junior Member
Great.

Once again, many thanks for your help.
Previous Topic: Should I enable or disable HyperThreading?
Next Topic: Sound inside VPS
Goto Forum:
  


Current Time: Sun Aug 18 08:18:24 GMT 2024

Total time taken to generate the page: 0.02918 seconds