diff --git a/nextcloud/migrate.sh b/nextcloud/migrate.sh index bcef088..77a00eb 100755 --- a/nextcloud/migrate.sh +++ b/nextcloud/migrate.sh @@ -37,12 +37,14 @@ TO=$2 - #---------------------------------------------------------------------- @ lxc-attach $FROM -- turnkey-occ maintenance:mode --on @ lxc-attach $TO -- turnkey-occ maintenance:mode --on +##FROM_INSTANCEID=$(lxc-attach $FROM -- turnkey-occ config:system:get instanceid) +##TO_INSTANCEID=$(lxc-attach $TO -- turnkey-occ config:system:get instanceid) + # XXX should we sleep here for a minute or 6 as is recommended in the docs??? # sql @@ -54,10 +56,18 @@ TO=$2 # files... @ pct mount $FROM @ pct mount $TO -# XXX this seems to fail... +# XXX need to also copy the logo and bg images... +# path seems to be: +# INSTANCEID=$(lxc-attach $ID -- turnkey-occ config:system:get instanceid) +# nextcloud-data/appdata_$INSTANCEID/theming/global/images/background @ rsync -Aavx \ /var/lib/lxc/$FROM/rootfs/var/www/nextcloud-data/ \ /var/lib/lxc/$TO/rootfs/var/www/nextcloud-data +# migrate cache and background/logo images... (XXX TEST) +##@ mv -f \ +## /var/lib/lxc/$TO/rootfs/var/www/nextcloud-data/appdata_$FROM_INSTANCEID{,.bak} +##@ mv -f \ +## /var/lib/lxc/$TO/rootfs/var/www/nextcloud-data/appdata_{$FROM_INSTANCEID,$TO_INSTANCEID} @ pct unmount $FROM @ pct unmount $TO