[lxc-users] lxc exec comand, redirecting
Gregory Lutostanski
gregory.lutostanski at canonical.com
Mon Apr 10 03:10:29 UTC 2017
I wrap mine in bash -c 'commands'
So something like:
root at host ~ $ lxc exec container -- bash -c "ssh vps7456.ovh.net 'tar czf -
/var/www/website.com/htdocs' | tar xzpf - -C/"
Will probably work.
--Greg
On Apr 9, 2017 5:03 PM, "Ingo Baab" <ib at baab.de> wrote:
Hello lxc-users,
Inside a Linuxcontainer I use:
root at container ~ $ ssh vps270841.ovh.net tar czf - /var/www/
website.com/htdocs | tar xzpf - -C/
to get a tar archive from another remote server by ssh and extract it
inside the container, works fine.
But how can I achieve the same from the host system? I tried different
things, but no success.
I tried it with:
root at host ~ $ lxc exec container -- ssh vps7456.ovh.net 'tar czf -
/var/www/website.com/htdocs' | tar xzpf - -C/
but this pipe 'goes' to the host system :( Is there another possibility
with `lxc push -` - or any sugestion from you?
Thank you in advance for any hint.
Ingo Baab
_______________________________________________
lxc-users mailing list
lxc-users at lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170409/ff52c195/attachment.html>
More information about the lxc-users
mailing list