fork stop container

This commit is contained in:
2024-01-28 20:50:55 +01:00
parent 02bbcc3878
commit 1fb20e7f88
7 changed files with 835 additions and 39 deletions

21
backup-lxd-conf.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
# Basic shell script to backup required LXD parts ##
## Backup and restore LXD config ##
## Today's date ##
NOW=$(date +'%m-%d-%Y')
echo $(date) "Starting backup of LXD ..."
## Dump LXD server config ##
echo $(date) "Making backup of lxd.config ..."
lxd init --dump >"/nfs/nas/LXD-Backup/lxd.config.${NOW}"
## Dump all instances list ##
echo $(date) "Making backup of lxd.instances.list ..."
lxc list >"/nfs/nas/LXD-Backup/lxd.instances.list.${NOW}"
## Make sure we know LXD version too ##
echo $(date) "Making backup of lxd.version ..."
snap list lxd >"/nfs/nas/LXD-Backup/lxd-version.${NOW}"
echo $(date) "Backup of LXD ended."