Compare commits

...

5 Commits

Author SHA1 Message Date
Sam Heinz c3f6fe0e6e Delete tools/pve/host-migrate.sh 2026-06-29 20:37:48 +10:00
Sam Heinz 0d7d3bfacf change libpcre3-dev to libpcre2-dev 2026-06-28 21:30:00 +10:00
Sam Heinz 81812089f6 hardcode openresty version and build it from website release 2026-06-28 21:28:46 +10:00
MickLesk 5bea573281 Improve storage prep & mounting in host-migrate
Add interactive storage preparation and safer mount handling for host-migrate.

- Track and clean up on-demand mounts via TEMP_MOUNTS and extend cleanup handler.
- Add helpers: _new_mountpoint, _offer_fstab, mount_existing_fs, format_and_mount, create_lv_and_mount to mount, format, or create LVs and optionally persist to /etc/fstab.
- Enhance browse_mounts to list unmounted block devices and LVM VGs, offer mount/format/LV creation, and return prepared mount via BROWSE_RESULT.
- Integrate prepared target into choose_location and do_export; show free-space warning before export.
- Improve vzdump output detection to pick the newest non-log file.
- Minor UX/message tweaks and quoting fixes for backup filenames when restoring storage.cfg and /etc/hosts.

These changes let users pick or prepare target storage (mount existing FS, format disks, create LVs) interactively and ensures temporary mounts are cleaned up.
2026-06-28 11:24:31 +02:00
MickLesk 5603b69b81 Add host-migrate.sh Proxmox VE tool
Add tools/pve/host-migrate.sh — an interactive Proxmox VE host migration utility. The script (whiptail UI) can export host configuration, /etc tarball, SSH keys, APT state and LXC/QEMU guests (vzdump or config-only) into a timestamped bundle, with optional on-demand NFS mounting. It also supports importing bundles to restore guests and selective host components (storage, users, SSH, APT, hosts, network, hostname) with explicit warnings for dangerous operations (network/hostname). Implements preflight checks, manifest creation, storage mapping checks, cleanup trap for NFS, and integrates helper functions loaded from the project's core scripts.
2026-06-28 11:17:47 +02:00
2 changed files with 9 additions and 5 deletions
+5 -3
View File
@@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}" var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}" var_disk="${var_disk:-8}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-12}" var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}" var_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}" var_unprivileged="${var_unprivileged:-1}"
@@ -60,8 +60,9 @@ function update_script() {
fi fi
$STD apt install -y build-essential "$pcre_pkg" libssl-dev zlib1g-dev $STD apt install -y build-essential "$pcre_pkg" libssl-dev zlib1g-dev
if check_for_gh_release "openresty" "openresty/openresty"; then OPENRESTY_VERSION="1.29.2.5"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "openresty" "openresty/openresty" "prebuild" "${CHECK_UPDATE_RELEASE}" "/opt/openresty" "openresty-*.tar.gz" if [[ "$(cat ~/.openresty 2>/dev/null)" != "$OPENRESTY_VERSION" ]]; then
CLEAN_INSTALL=1 fetch_and_deploy_from_url "https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz" "/opt/openresty"
msg_info "Building OpenResty" msg_info "Building OpenResty"
cd /opt/openresty cd /opt/openresty
@@ -77,6 +78,7 @@ function update_script() {
--with-stream_ssl_module --with-stream_ssl_module
$STD make -j"$(nproc)" $STD make -j"$(nproc)"
$STD make install $STD make install
echo "${OPENRESTY_VERSION}" >~/.openresty
rm -rf /opt/openresty rm -rf /opt/openresty
cat <<'EOF' >/lib/systemd/system/openresty.service cat <<'EOF' >/lib/systemd/system/openresty.service
[Unit] [Unit]
+4 -2
View File
@@ -18,7 +18,7 @@ $STD apt install -y \
apache2-utils \ apache2-utils \
logrotate \ logrotate \
build-essential \ build-essential \
libpcre3-dev \ libpcre2-dev \
libssl-dev \ libssl-dev \
zlib1g-dev \ zlib1g-dev \
git \ git \
@@ -36,7 +36,8 @@ $STD /opt/certbot/bin/pip install certbot certbot-dns-cloudflare
ln -sf /opt/certbot/bin/certbot /usr/local/bin/certbot ln -sf /opt/certbot/bin/certbot /usr/local/bin/certbot
msg_ok "Set up Certbot" msg_ok "Set up Certbot"
fetch_and_deploy_gh_release "openresty" "openresty/openresty" "prebuild" "latest" "/opt/openresty" "openresty-*.tar.gz" OPENRESTY_VERSION="1.29.2.5"
fetch_and_deploy_from_url "https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz" "/opt/openresty"
msg_info "Building OpenResty" msg_info "Building OpenResty"
cd /opt/openresty cd /opt/openresty
@@ -52,6 +53,7 @@ $STD ./configure \
--with-stream_ssl_module --with-stream_ssl_module
$STD make -j"$(nproc)" $STD make -j"$(nproc)"
$STD make install $STD make install
echo "${OPENRESTY_VERSION}" >~/.openresty
rm -rf /opt/openresty rm -rf /opt/openresty
cat <<'EOF' >/lib/systemd/system/openresty.service cat <<'EOF' >/lib/systemd/system/openresty.service