From 1eaf803c29974c95a5e848554848a5f1d6096f34 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 30 Nov 2022 22:03:06 -0500 Subject: [PATCH] Update hacore2hacore-data.sh --- misc/hacore2hacore-data.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/hacore2hacore-data.sh b/misc/hacore2hacore-data.sh index 1faff32c..3f5352e6 100644 --- a/misc/hacore2hacore-data.sh +++ b/misc/hacore2hacore-data.sh @@ -81,15 +81,15 @@ if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then pct stop $CTID_TO fi msg "Mounting Container Disks..." -DOCKER_PATH=/var/lib/docker/volumes/hass_config/_data CORE_PATH=/root/.homeassistant +CORE_PATH2=/root/ CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_FROM}'." [ -d "${CTID_FROM_PATH}${CORE_PATH}" ] || die "Home Assistant directories in '$CTID_FROM' not found." CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") || die "There was a problem mounting the root disk of LXC '${CTID_TO}'." -[ -d "${CTID_TO_PATH}${CORE_PATH}" ] || +[ -d "${CTID_TO_PATH}${CORE_PATH2}" ] || die "Home Assistant directories in '$CTID_TO' not found." msg "Copying Data..." @@ -102,7 +102,7 @@ RSYNC_OPTIONS=( --info=progress2 ) msg "<======== Docker Data ========>" -rsync ${RSYNC_OPTIONS[*]} ${CTID_FROM_PATH}${CORE_PATH} ${CTID_TO_PATH}${CORE_PATH} +rsync ${RSYNC_OPTIONS[*]} ${CTID_FROM_PATH}${CORE_PATH} ${CTID_TO_PATH}${CORE_PATH2} echo -en "\e[1A\e[0K\e[1A\e[0K" info "Successfully Transferred Data."