nc snap (30.0.8) migration to a new server ends with permanent maintenance-mode

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.8snap1
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04 lts (HV-Gen2)
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Hyperv VM Gen2
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

just migrated to a new VM from Ubuntu 22.04 (HV-Gen1)
with

On the old server:

  1. Stop nextcloud-snap
sudo snap stop nextcloud
  1. Create snapshot. This will create a .zip file in /var/lib/snapd/snapshots/. In my case its name was 3_nextcloud_30.0.8snap1_xxxxx.zip
    This File is relatively big (350GB) but I had no problems to transfer it to the new Server.
sudo snap save nextcloud

transfer the file to the new server

On the new server:

  1. Install nextcloud-snap
sudo snap install nextcloud

2a. first try: just leave as it is
2b. second try: configured all addons identical to the old setup

  1. Restore snapshot. Replace <n> with the first number of the .zip file, in my case 3.
sudo snap restore <n>
  1. Disable maintenance mode
sudo nextcloud.occ maintenance:mode --off
  1. Make sure everything is working fine
    no its not.

nextcloud delivers the login page where i can enter username and password. After I hit Login, it loads the error message, that Nextcloud is in maintenance mode

Wartungsmodus

Diese Instanz der cloud.tld.de - befindet sich gerade im Wartungsmodus, was eine Weile dauern kann. Diese Seite aktualisiert sich automatisch, sobald die Nextcloud-Instanz wieder verfügbar ist.

Kontaktiere die Systemadministration, wenn diese Meldung dauerhaft oder unerwartet erscheint.

I tried to turn mm off and on and off with

nextcloud.occ maintenance:mode --off
nextcloud.occ maintenance:mode --on
nextcloud.occ maintenance:mode --off

without success.

I also compared the config.php with the “old” still working instance. there are no diferences, the IPs are corresponding to the system, where the file is.

Now I need input on how to proceed.
or should I wait a day or two because of the big amount of data?

Thanks in Advance.

yeah, that’s quite a chunk of data… depending on your resources it could take a while, so be patient. consider restarting the snap after the migration is done.

other than that, you’ve done it by the book, so that migration should work. unless you’ve changed your data directory… have you?

the procedure works and I’ve done it on several instances.

see also backup, restore & migrate Nextcloud snap

Thanks,

I’ll wait a few days and just keep it running.

didn’t change anything, except config.php with the IP of the new server and a temporally url next.tld.de instead of cloud.tld.de for testing, until it goes live.

as users are still active on the old server, it will be necessary to repeat again if i’m sure, that the migration process is working.