My MariaDB Container Disappeared

Copied from my post on the Nix forums:

I had a home server that I built some applications on about a year ago. The design was NixOS as the host, which ran a Go executable natively. In a container (I think I called it dabba, but so much has happened between setting it up and now that I can’t really remember) was the mysql database.

I noticed one day that the Go program was throwing errors, so I checked my logs and noticed that the database wasn’t being connected to. I wasn’t too surprised, as we’ve had random power outages in my area as long as I can remember. I’d recently restarted my home server after one and assumed that I’d forgotten to restart my mariadb lxd container. I issued the command (I think it was sudo lxc exec dabba -- /bin/bash) to enter into and restart the db container and got an error telling me that

Unsupported command 'exec'
Known commands:
attach autostart cgroup checkpoint config console copy create destroy device execute freeze info ls monitor snapshot start stop top unfreeze unshare wait 

I’m pretty sure this is the command that I’ve used for eternity, so it doesn’t make sense to me that it would now be telling me that the command doesn’t exist. I will say that I had recently done an upgrade with sudo nixos-rebuild switch but I’m pretty sure I’d started it since that upgrade.

From what I’ve found online, that’s the output of an older version of lxc, but I just did an upgrade so I don’t know why one particular executable is now older. Doing sudo lxc ls shows two containers, neither of which is my db container. They look like containers that I would have created while originally learning lxc/lxd.

Welcome!

There are three types of software, and I am not sure which one you are using.

  1. LXC, which has commands of the type lxc-create, lxc-attach, lxc-start, lxc-execute, etc. This is the oldest of the projects, it is still supported (official support in this forum), and it looks like you might have been using that.
  2. LXD, which has commands that start with lxc and then you add an action. The example that you give, says that you might be using that, but the output resembles LXC. LXD is not supported here anymore, since about a year and a half ago. This forum switched to Incus, which a continuation of LXD, and there’s a tool to migrate out of LXD and into Incus.
  3. Incus, which is supported in this forum but it’s not what you currently have on your system. Because your system likely predates the creation of the Incus project.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.