diff --git a/README.md b/README.md index ea0ef59..f6f8120 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ +__This repository is outdated and unmaintained, please use https://git.my-web.xyz/milan/usi-mm__ + __Features:__ +lxd-to-incus -> +script to migrate usl-mm installations from lxd to incus + copy_containers -> script for easy bulk container migrate via SSH between instalations of usl-mm, is also possible use it in non-interactive mode with parameters in this order: container-name, destination-host, destination-port(optional) diff --git a/lxd-to-incus b/lxd-to-incus new file mode 100755 index 0000000..897708c --- /dev/null +++ b/lxd-to-incus @@ -0,0 +1,40 @@ +#!/bin/bash +curl -fsSL https://pkgs.zabbly.com/key.asc -o /etc/apt/keyrings/zabbly.asc +sh -c 'cat < /etc/apt/sources.list.d/zabbly-incus-lts-6.0.sources +Enabled: yes +Types: deb +URIs: https://pkgs.zabbly.com/incus/lts-6.0 +Suites: $(. /etc/os-release && echo ${VERSION_CODENAME}) +Components: main +Architectures: $(dpkg --print-architecture) +Signed-By: /etc/apt/keyrings/zabbly.asc + +EOF' + +apt update +apt install incus -y + +incus ls + +lxd-to-incus --ignore-version-check --yes + +incus admin shutdown + +systemctl stop incus +systemctl stop incus.socket +systemctl stop incus-user.socket + +zfs set mountpoint=/var/lib/incus crypt/lxd/dir + +systemctl start incus.socket +systemctl start incus-user.socket +systemctl start incus + + +cp /root/onstart /root/onstart-backup + +rpl 'LXD snap daemon' 'Incus daemons' /root/onstart +rpl '/var/snap/lxd/common/lxd/' '/var/lib/incus/' /root/onstart + +sed -i 's/snap disable lxd/systemctl stop incus\nsystemctl stop incus.socket\nsystemctl stop incus-user.socket/' /root/onstart +sed -i 's/snap enable lxd/systemctl start incus-user.socket\nsystemctl start incus.socket\nsystemctl start incus/' /root/onstart