nextcloud/all-in-one

Migration from snap not working

Open

#8,424 opened on Jul 6, 2026

View on GitHub
 (3 comments) (0 reactions) (0 assignees)PHP (1,028 forks)batch import
1. to developdocumentationhelp wanted

Repository metrics

Stars
 (9,719 stars)
PR merge metrics
 (Avg merge 4d 1h) (81 merged PRs in 30d)

Description

Hi guys,

Is your feature request related to a problem? Please describe.

Yes, I am trying to migrate a snap installation to Nextcloud-AIO but I'm facing multiple issues when following the documentation to the letter.

Describe the solution you'd like

I'd like the documentation to work.

Additional context

  • At step 10, when running this command : sudo docker exec -i mysql-migration mysql -u nextcloud -p"$MYSQL_PASSWORD" nextcloud < ~/mysql-dump.sql I get the following error (even when starting container with --skip-log-bin) : 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

    The workaround I found is to import as root but I am not sure this is the best method.

  • At step 13, when running the last command : sudo docker exec -u www-data nextcloud-convert php occ db:convert-type --all-apps --password "$PG_PASSWORD" pgsql "$PG_USER" postgres-migration "$PG_DATABASE"

    I get the following error :

    Console has to be executed with the user that owns the file config/config.php Current user id: 33 Owner id of config.php: 1000 Try adding 'sudo -u #1000' to the beginning of the command (without the single quotes) If running with 'docker exec' try adding the option '-u 1000' to the docker command (without the single quotes)

    The workaround I found : sudo chown 33:33 /tmp/migration-config.php

    But then :

    Your data directory is not writable.
    Permissions can usually be fixed by giving the web server write access to the root directory. See https://docs.nextcloud.com/server/33/go.php?to=admin-dir_permissions.

    An unhandled exception has been thrown:
    Exception: Environment not properly prepared. in /var/www/html/lib/private/Console/Application.php:143
    Stack trace:
    #0 /var/www/html/console.php(86): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #1 /var/www/html/occ(33): require_once('/var/www/html/c...')

The workaround I found : sudo chown -R 33:33 /var/snap/nextcloud/com mon/nextcloud/data. Also had to to chown 33:33 the config/ folder inside the container

Then when I could finally run the migration command :

In Config.php line 273:
                                                                                            
  Configuration was not read or initialized correctly, not overwriting /var/www/html/confi  
  g/config.php

I didn't find any workaround for this one.

Is it possible to fix the documentation?

Thank you guys!

Contributor guide