roller24's picture


Do the containers produced inside of turnkey-lxc carry over to the tklmb backup?

I buggered up my system trying some pbx stuff, and restored my backup, and only the host was restored.

I was almost certain that I kept these lxcs in tact at backup time.

I did a backup and it seemed to succeed without a hitch. 

The restore was on a fresh tk-lxc install, and everything came back except the containers.

oh well, time for a fresh approach, I suppose.


Jeremy Davis's picture

As you've noticed, the LXC appliance only backs up the host. Regarding the guests, you have 2 options (with an array of sub-options). Either you can adjust the default TKLBAM config to also include them. Or you can back them up separately.

The exclusion of the guests is intentional and no testing has been done regarding guests, so my ideas are only theoretical. At this point, the only reliable way to create guest backups is to back them up individually (e.g. each TKL guest appliance can have it's own TKLBAM backup). IIRC LXC also has it's own backup methodology (which could be leveraged via TKLBAM hooks).

TKLBAM is intended as a "smart" minimalist OS level backup tool. As we can not make any assumptions about what guests may potentially be running (e.g. it's possible to run a CentOS LXC guest), the only safe way to back up all guests would be to backup the whole guest. As TKLBAM's design does not really lend itself well to just restoring certain parts (e.g. individual guests) that would make for a potentially unwieldy backup, so it's generally recommended to backup guests individually.

As hinted above, you could add components to the overrides to include them (as noted in the docs). If you go that path though, you'd probably be well advised to ensure that you exclude parts of the guest filesystems (i.e. at least /dev, /sys and /proc).

I have plenty more ideas on how you might be able to leverage hook scripts to backup and restore guests, but I don't have time ATM to elaborate. When I get a chance, I'll try to outline them a little more.

I'm not sure that even really answers your question, so please feel free to ask for more info.

roller24's picture

Not to bother, at this point. I've begun to re-establish the whole thing with Proxmox. Going well, so far, and the nodes, and separation in PM is much clearer, than with the TKL-LXC appliance. Backups and Migrations should be much easier now, as I have eliminated the TKL-LXC from the stacks. All part of the learning experience! 

Jeremy Davis's picture

Yeah I must say that I'm a big fan of Proxmox. I've been using it for years (before I knew anything much about Linux). Also, if you're into Python programming and want to control it programmatically, then I can highly recommend the Proxmoxer library (I use it with Python3, but it's also compatible with Python2 AFAIK). It's a wrapper for the Proxmox API. If Python isn't your thing, then you'll find libraries for other languages on the Proxmox API wiki page.

Add new comment