Dino Geek, try to help you

How to make a backup of an LXC container?


Backing up an LXC container is quite straightforward and can be done by following these steps:

1. First, ensure your container is stopped. You cannot backup an LXC container while it is running. Use the following command to stop the container:

\`\`\` lxc-stop -n container\_name \`\`\` Replace “container\_name” with the name of your container.

1. Once your container is stopped, navigate to the directory where your LXC containers are stored. By default, this is “/var/lib/lxc”.

\`\`\` cd /var/lib/lxc \`\`\`

1. From here, you can create a .tar.gz archive of your container’s directory. This will include all the necessary files to restore your container later.

\`\`\` tar -czvf container_name.tar.gz container_name/ \`\`\` Replace “container\_name” with the name of your container.

And that’s it! You now have a backup of your LXC container. To restore this backup, you would simply extract the archive in the same directory (“/var/lib/lxc”) and start the container with `lxc-start`.

Please note: The backup only includes the container’s filesystem and configuration. It does not include any snapshots or other metadata. If you have snapshots, you will need to backup those separately.


Simply generate articles to optimize your SEO
Simply generate articles to optimize your SEO





DinoGeek offers simple articles on complex technologies

Would you like to be quoted in this article? It's very simple, contact us at dino@eiki.fr

CSS | NodeJS | DNS | DMARC | MAPI | NNTP | htaccess | PHP | HTTPS | Drupal | WEB3 | LLM | Wordpress | TLD | Domain name | IMAP | TCP | NFT | MariaDB | FTP | Zigbee | NMAP | SNMP | SEO | E-Mail | LXC | HTTP | MangoDB | SFTP | RAG | SSH | HTML | ChatGPT API | OSPF | JavaScript | Docker | OpenVZ | ChatGPT | VPS | ZIMBRA | SPF | UDP | Joomla | IPV6 | BGP | Django | Reactjs | DKIM | VMWare | RSYNC | Python | TFTP | Webdav | FAAS | Apache | IPV4 | LDAP | POP3 | SMTP

| Whispers of love (API) | Déclaration d'Amour |






Legal Notice / General Conditions of Use