Migrating a nextcloud instance from NS7 to NS8 on a separate data volume : a journey

Got some success :blush:

This what I did :

  • mount the xfs drive with context=system_u:object_r:container_file_t:s0
  • init migration
  • go into the app environment and
# Fix permissions 
# 1. inside the container : 
grep ^nextcloud2: /etc/subuid
nextcloud2:493216:65536
# 2. fix from outside the container
chown -R 493298:493298 /mnt/nextcloudstorage  # # 493216+82 = 493298 !
# EDIT : that should be 493216 + 82 -1 = 493297... but it works anyway (probably not needed)
chmod 777 /mnt/nextcloudstorage # not sure it's needed
  • stop rsync-nextcloudx
  • delete then recreate the volume bind-mounted
podman volume create \
  --opt type=none \
  --opt device=/mnt/nextcloudstorage \
  --opt o=bind \
  nextcloud-app-data
  • relaunch rsync-nextcloudx with --security-opt label=disable !
  • Launch the sync
  • edit systemctl --user edit --full nextcloud-appadd --security-opt label=disable
  • not sure I restarted rsync-nextcloudx at this step. Might be.
  • Finish the migration → success :tada:
1 Like