Migration from snap installation to docker AIO

  • Nextcloud Server version (e.g., 29.x.x):
    • 33.0.5
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04
  • Web server and version (e.g, Apache 2.4.25):
    • Snap built-in
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • None
  • PHP version (e.g, 8.3):
    • Snap built-in
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • Some months ago at least
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • SNAP
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

I am trying to migrate a self-hosted Nextcloud instance from snap to Docker AIO.

I followed the official guide (all-in-one/migration.md at main · nextcloud/all-in-one · GitHub) until step 10 without problem.

At step 10, I had to import the database as root to prevent this error :

ERROR 1419 (HY000) at line 2352: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

Fix :

docker exec -i mysql-migration mysql -u root -pmysql-root-temp nextcloud < ./mysql-dump.sql

After this step, i followed the guide until step 13.

At this point, I had multiple problems :

  • /var/www/html/occ didn’t exist in the container (probably because the entrypoint wasn’t run) => so I replaced with /usr/src/nextcloud/occ
  • The SNAP_DATAdirectory had to have write permission, so I replaced :ro by :rw

And after this fixes, I still faced an error :

Nextcloud is not installed - only a limited number of commands are available

  There are no commands defined in the "db" namespace.

But I don’t know how to fix this one.

Steps to replicate it (hint: details matter!):

  1. Follow the official guide with the above fixes

Thanks for your help, feel free to ask for more details if I missed something.

Hi, thanks for this post!

We just made a few improvements to these docs with Fix snap-to-AIO migration docs by szaimen · Pull Request #8396 · nextcloud/all-in-one · GitHub.

Please try again by following the updated docs: all-in-one/migration.md at main · nextcloud/all-in-one · GitHub

Hi!

Thanks a lot!

I just tried it but couldn’t run the full migration because snap is already version 33.0.6 while docker image seems to be still 33.0.5.

But I still got an issue while importing the database in mysql container (step 10):

ERROR 1227 (42000) at line 2353: Access denied; you need (at least one of) the SUPER or SET_ANY_DEFINER privilege(s) for this operation

Still worked when importing as root though.