<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">What I do is store my containers in a
disk image with a filesystem, usually ext4. I store the image in
the LXC server's /opt. I mount the LXC's to /srv before starting
them because I haven't figured out how to run them directly out of
the disk images yet. I back up the disk images with rsnapshot with
a sparse option. It saves a lot of time because there is only one
file to backup instead of hundreds for each LXC.<br>
<br>
To restore I mount the disk image and rsync the target file back
to the original container or copy up the whole container disk
image over the one that wasn't in the the state I needed it to be
in. To back up databases, you need to make sure you get a database
dump before the backup. The way I like to do it is by using a
remote ssh command and dump the database over an ssh socket from
the backup machine, I copy the dump command up using standard
input and copy the database dump back down using standard output.
Keeping database files on a separate image file is helpful to
reduce the size of backups but not required.<br>
<br>
On 12/04/2015 11:32 AM, Saint Michael wrote:<br>
</div>
<blockquote
cite="mid:CAC9cSOCF=fDDs8cG78cFeD4o-Q6y2P+MyybzP8PfHW4m2ZWGqA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-size:small">I was going t
ask the same question.<br>
</div>
<div class="gmail_default" style="font-size:small">It is a very
important one. I am moving containers via rsync, but it takes
tooo long.<br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Dec 4, 2015 at 11:03 AM, Eax
Melanhovich <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:afiskon@devzen.ru" target="_blank">afiskon@devzen.ru</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hello.<br>
<br>
Lets say I have some container. I would like to run
something like:<br>
<br>
lxc-backup -n test-container my-backup.tgz<br>
<br>
Then move backup somewhere (say, to Amazon S3). Then say I
would like<br>
to restore my container or create its copy on different
machine. So I<br>
need something like:<br>
<br>
lxc-restore -n copy-of-container my-backup.tgz<br>
<br>
I discovered lxc-snapshot, but it doesn't do exactly what I
need.<br>
<br>
So what is the right way of backuping and restoring linux
containers?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Best regards,<br>
Eax Melanhovich<br>
<a moz-do-not-send="true" href="http://eax.me/"
rel="noreferrer" target="_blank">http://eax.me/</a><br>
_______________________________________________<br>
lxc-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
<a moz-do-not-send="true"
href="http://lists.linuxcontainers.org/listinfo/lxc-users"
rel="noreferrer" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a></font></span></blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
lxc-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a>
<a class="moz-txt-link-freetext" href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a></pre>
</blockquote>
<br>
</body>
</html>