I tried doing lxc-image (lxc-snapshot) and nothing happened and nothing was created.
Here are all the binaries I have related to lxc (as far as I know):
Any direction and advice is appreciated. Please don’t tell me to install LXD on Debian. I’m attempting to do everything with vanilla distro and tools here.
The problem is I mistyped when I said lxc-image.
The next problem is I can’t figure how to create a snapshot using using only lxc. I can’t create snapshots for some reason.
I also can’t backup or restore using just lxc.
I’m ignorant and asking for some help with examples.
I haven’t used those tools in a long time, but indeed lxc-snapshot just creates a snapshot entry in /var/lib/lxc with behavior dependent on the storage backend. I don’t think I’ve ever used it myself.
lxc-copy is @brauner re-implementing lxc-clone in C (I wrote lxc-clone in python3 I believe), I think that all landed around LXC 2.0.
It could be just me but lxc-snapshot does nothing on my system. Nothing is generated @ /var/lib/lxc. Would someone provide an example of creating a snapshot? Maybe it’s me and I also don’t know where Debian dumps the snapshot?
#Rename the rootfs directory cd /path/to/container mv rootfs rootfs.old
#Create a Btrfs subvolume and move the contents of rootfs to it: btrfs subvolume create rootfs #su or sudo the mv or it won’t work sudo mv rootfs.old/* rootfs/ rmdir rootfs.old
#Adjust the container config settings, namely by replacing dir with btrfs: nano /path/to/container/config
#To make sure that the container is now located on the Btrfs subvolume, run: btrfs subvolume list /path/to/container