Re: [lxc-users] LXC copy snapshots only to remote?
Hi Fajar, Yes, I'm aware of other alternatives. My question is geared towards how LXD/LXC works with snapshots. Thanks! Lai From: "Fajar A. Nugraha" To: "lxc-users" Sent: Wednesday, March 7, 2018 2:40:59 PM Subject: Re: [lxc-users] LXC copy snapshots only to remote? On Thu, Mar 8, 2018 at 1:49 AM, Lai Wei-Hwa < [ mailto:wh...@robco.com | wh...@robco.com ] > wrote: Thanks Fajar, I'm more interested in if I'm right or wrong and why that's the case. Incremental snapshot support is in LXD 3.0 but I'm asking in relation to LXC, not LXD. And I'm really looking to clear up my (mis)understanding. Ah, I must not have the most recent info then. Regardles when (or if) the devs decided to implement it in lxc (even support in lxd seems not completed yet: [ https://github.com/lxc/lxd/issues/3326 | https://github.com/lxc/lxd/issues/3326 ] ), you could always perform storage-level backup yourself. Particularly handy if you have lots of containers, use zfs, and use recursive incremental send. -- Fajar ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] LXC copy snapshots only to remote?
> If I'm right, how do I copy SC by itself (and not the whole container) to H2 > on Wednesday? You can be right, but developers just didn't create lxc- command for this. Did you try to simply copy SC files over C2 and run the result? LXC 1.0 command layer is very thin, you can observe and emulate results of most of them. -- With Best Regards, Marat Khalili ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] LXC copy snapshots only to remote?
On Thu, Mar 8, 2018 at 1:49 AM, Lai Wei-Hwa wrote: > Thanks Fajar, > > I'm more interested in if I'm right or wrong and why that's the case. > > Incremental snapshot support is in LXD 3.0 but I'm asking in relation to > LXC, not LXD. And I'm really looking to clear up my (mis)understanding. > > Ah, I must not have the most recent info then. Regardles when (or if) the devs decided to implement it in lxc (even support in lxd seems not completed yet: https://github.com/lxc/lxd/issues/3326), you could always perform storage-level backup yourself. Particularly handy if you have lots of containers, use zfs, and use recursive incremental send. -- Fajar ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] LXC copy snapshots only to remote?
Thanks Fajar, I'm more interested in if I'm right or wrong and why that's the case. Incremental snapshot support is in LXD 3.0 but I'm asking in relation to LXC, not LXD. And I'm really looking to clear up my (mis)understanding. Thanks! Lai From: "Fajar A. Nugraha" To: "lxc-users" Sent: Wednesday, March 7, 2018 1:17:07 PM Subject: Re: [lxc-users] LXC copy snapshots only to remote? On Thu, Mar 8, 2018 at 12:03 AM, Lai Wei-Hwa < [ mailto:wh...@robco.com | wh...@robco.com ] > wrote: Hi Everyone, I'm probably not fully grasping how LXC containers/snapshotting works, but why isn't the following possible? HostContainer Monday Tuesday Wed Thurs H1 C1 (fresh Ubuntu) SA (added apache) SB (removed apache and added nginx) SC (hardened nginx config) Host dies H2 C2 (created from C1 Snapshot B) SC (with hardened nginx config) On Tuesday, I snapshot C1 (creating SB) and stop the container. I then jump on a new host (H2) and copy snapshot B: BQ_BEGIN H2$ lxc copy H1:C1/SB C2 At this point, my C2 is equivalent to C1 + SA + SB. Thus, I believe that C1 + SA + SB = C2 On Wednesday, I take Snapshot C on H1. I believe that on Wednesday, after taking SC, I should be able to copy SC alone to H2. And then on Thursday, when H1 dies, I should be able to go to H2 and launch SC (C2 + SC) and have the same container I had on H! when I first took Snapshot C. If I'm wrong, why am I wrong? If I'm right, how do I copy SC by itself (and not the whole container) to H2 on Wednesday? BQ_END I'm pretty sure lxc doesn't do incremental snapshots. To get what you want, you need to manage the storage snapshots (and incremental send) yourself. For example, if using zfs, you can use sanoid + syncoid. -- Fajar ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users
Re: [lxc-users] LXC copy snapshots only to remote?
On Thu, Mar 8, 2018 at 12:03 AM, Lai Wei-Hwa wrote: > Hi Everyone, > > I'm probably not fully grasping how LXC containers/snapshotting works, but > why isn't the following possible? > > *Host* *Container* > *Monday* > *Tuesday* > *Wed* > *Thurs* > H1 > C1 (fresh Ubuntu) > SA (added apache) > SB (removed apache and added nginx) > SC (hardened nginx config) > Host dies > H2 > C2 (created from C1 Snapshot B) > > > SC (with hardened nginx config) > > > On Tuesday, I snapshot C1 (creating SB) and stop the container. I then > jump on a new host (H2) and copy snapshot B: > > *H2$ * lxc copy H1:C1/SB C2 > > At this point, my C2 is equivalent to C1 + SA + SB. Thus, I believe that > C1 + SA + SB = C2 > > On Wednesday, I take Snapshot C on H1. > > I believe that on Wednesday, after taking SC, I should be able to copy SC > *alone* to H2. And then on Thursday, when H1 dies, I should be able to go > to H2 and launch SC (C2 + SC) and have the same container I had on H! when > I first took Snapshot C. > > If I'm wrong, why am I wrong? If I'm right, how do I copy SC by itself > (and not the whole container) to H2 on Wednesday? > > > I'm pretty sure lxc doesn't do incremental snapshots. To get what you want, you need to manage the storage snapshots (and incremental send) yourself. For example, if using zfs, you can use sanoid + syncoid. -- Fajar ___ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users