When short on disk space and storing backup locally, delete all local backups before a new one is created. Otherwise, enough disk space for a minimum of 2 full backups is needed, which may not be available.
a deep copy of a dictionary with values of type `dict_keys`, required by the underlying ldap3 python3 library, is no longer allowed. they must be a `list` type
actual error:
Traceback (most recent call last):
File "/mailinabox/setup/migrate.py", line 461, in <module>
run_miabldap_migrations()
File "/mailinabox/setup/migrate.py", line 440, in run_miabldap_migrations
raise e
File "/mailinabox/setup/migrate.py", line 431, in run_miabldap_migrations
migration_func(env)
File "/mailinabox/setup/migrate.py", line 249, in migration_miabldap_1
users=m13.create_users(env, conn, ldap, ldap_base, ldap_users_base, ldap_domains_base)
File "/mailinabox/setup/migration_13.py", line 137, in create_users
dn = add_user(env, ldapconn, ldap_base, ldap_users_base, ldap_domains_base, email, password, privs.split("\n"), totp)
File "/mailinabox/setup/migration_13.py", line 90, in add_user
ldapconn.add(dn, objectClasses, attrs)
File "/usr/lib/python3/dist-packages/ldap3/core/connection.py", line 947, in add
_attributes = deepcopy(attributes) # dict could change when adding objectClass values
File "/usr/lib/python3.10/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.10/copy.py", line 231, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 161, in deepcopy
rv = reductor(4)
TypeError: cannot pickle 'dict_keys' object
Nextcloud:
* The Nextcloud user_external 1.0.0 package for Nextcloud 21.0.7 isn't available from Nextcloud's releases page, but it's not needed in an intermediate upgrade step (hopefully), so we can skip it.
* Nextcloud updgrade steps should not be elifs because multiple intermediate upgrades may be needed.
* Continue if the user_external backend migration fails. Maybe it's not necessary. It gives a scary error message though.
* Remove a line that removes an old file that hasn't been in use since 2019 and the expectation is that Ubuntu 22.04 installations are on fresh machines.
Backups:
* For duplicity, we now need boto3 for AWS.
The first version supporting PHP 8.0 is Nextcloud 21. Therefore we can add migrations only to Nextcloud 21 forward, and so we only support migrating from Nextcloud 20 (Mail-in-a-Box versions v0.51+). Migration steps through Nextcloud 21 and 22 are added.
Also:
* Fix PHP APUc settings to be before Nextcloud tools are run.