Hi,
So we tried to the migration following the steps:
- stop mailman in the old machine (v3.1.1 from ubuntu packages)
- dump DB mailman3 and mailman3web
- backup /var/lib/mailman3 content
On the new machine:
- checkout from git the version 3.1.1 to match production and install the services
- stop mailman3 and mailman3-web on the new machine
- load DBs into new machine
- copy content from /var/lib/mailman3 into /local/mailman/var (which means: archives/ cache/ data/ ext/ lists/ locks/ messages/ public_suffix_list.dat queue/ templates/ web/)
- start mailman3 and mailman-3web
- run mailman3-web migrate
And I stopped here. Because it crashed.
(venv) mailman@new-mailman3-server ~ (v3.1.1) [0|SIGINT]> mailman-web migrate System check identified some issues:
WARNINGS: account.EmailAddress: (models.W036) MariaDB does not support unique constraints with conditions. HINT: A constraint won't be created. Silence this warning if you don't care about it. account.EmailAddress: (models.W043) MariaDB does not support indexes on expressions. HINT: An index won't be created. Silence this warning if you don't care about it. Operations to perform: Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount Running migrations: Applying account.0003_alter_emailaddress_create_unique_verified_email... OK Applying account.0004_alter_emailaddress_drop_unique_email... OK Applying account.0005_emailaddress_idx_upper_email... OK Applying admin.0003_logentry_add_action_flag_choices... OK Applying auth.0009_alter_user_last_name_max_length... OK Applying auth.0010_alter_group_name_max_length... OK Applying auth.0011_update_proxy_permissions... OK Applying auth.0012_alter_user_first_name_max_length... OK Applying django_mailman3.0003_sessions... OK Applying django_q.0010_auto_20200610_0856... OK Applying django_q.0011_auto_20200628_1055... OK Applying django_q.0012_auto_20200702_1608... OK Applying django_q.0013_task_attempt_count... OK Applying django_q.0014_schedule_cluster... OK Applying hyperkitty.0016_auto_20180309_0056... OK Applying hyperkitty.0017_file_attachments... OK Applying hyperkitty.0018_threadcategory_color... OK Applying hyperkitty.0019_auto_20190127_null_description... OK Applying hyperkitty.0020_auto_20190907_1927... OK Applying hyperkitty.0021_add_owners_mods...Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute return self.cursor.execute(sql) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 75, in execute return self.cursor.execute(query, args) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute res = self._query(mogrified_query) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query db.query(q) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 261, in query _mysql.connection.query(self, query) MySQLdb.OperationalError: (1050, "Table 'hyperkitty_mailinglist_moderators' already exists")
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/local/mailman/venv/bin/mailman-web", line 8, in <module> sys.exit(main()) File "/local/mailman/venv/lib/python3.10/site-packages/mailman_web/manage.py", line 90, in main execute_from_command_line(sys.argv) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line utility.execute() File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 402, in run_from_argv self.execute(*args, **cmd_options) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 448, in execute output = self.handle(*args, **options) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 96, in wrapped res = handle_func(*args, **kwargs) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 349, in handle post_migrate_state = executor.migrate( File "/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/executor.py", line 135, in migrate state = self._migrate_all_forwards( File "/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards state = self.apply_migration( File "/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/executor.py", line 252, in apply_migration state = migration.apply(state, schema_editor) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/migration.py", line 130, in apply operation.database_forwards( File "/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/operations/fields.py", line 108, in database_forwards schema_editor.add_field( File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/schema.py", line 104, in add_field super().add_field(model, field) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py", line 636, in add_field return self.create_model(field.remote_field.through) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py", line 447, in create_model self.execute(sql, params or None) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py", line 199, in execute cursor.execute(sql, params) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute return self._execute_with_wrappers( File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers return executor(sql, params, many, context) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute with self.db.wrap_database_errors: File "/local/mailman/venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute return self.cursor.execute(sql) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 75, in execute return self.cursor.execute(query, args) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute res = self._query(mogrified_query) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query db.query(q) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 261, in query _mysql.connection.query(self, query) django.db.utils.OperationalError: (1050, "Table 'hyperkitty_mailinglist_moderators' already exists")
I tried to drop the table, but then it complained about another one. I dropped all the complained tables and as result hypperkitty never started. So I went back to see why the first error happened.
Any clue what to do next?
Best Regards, Helio Loureiro https://helio.loureiro.eng.br https://github.com/helioloureiro https://mastodon.social/@helioloureiro