Migration Nextcloud Pelican --> Nextcloud test
- Upgrade nextcloud on Pelican
- Deploy a new Nextcloud instance (FS) with OpenStack (same NC release + MariaDB 10.5.11)
> minimum 100GB for DB host, storepelican available with NFS
> add
'proxy' => 'proxy.sipr.ucl.ac.be:889',
in the NC config
- Halt NC on Pelican and
- rsync the mysql folder from DB container
- rsync the Nextcloud data folder from storepelican to a test folder (still on storepelican)
- Halt mariadb in the DB VM and rsync the mysql folder above
> check ownership (mysql:mysql) on the folder before starting mariadb
- Halt apache in the NC VM and update the NC config
- overwrite 'passwordsalt' and 'secret' in the config from pelican
- add
putenv('LDAPTLS_CACERT=/etc/ssl/certs/cacism3.pem');
> check the existence of /etc/ssl/certs/cacism3.pem
on the NC VM
- overwrite 'datadirectory'
> check ownership (apache:apache) on the full datadirectory folder before starting apache
- Check the instance
Make Nextcloud lighter and cleaner
- Nextcloud data relief
- clean the files
>
sudo -u apache php occ files:cleanup
- remove remnants users with
01_delete_remnants.sh
> sudo -u apache php occ ldap:show-remnants
- clean trash
>
sudo -u apache php occ trashbin:clean --all-users
- remove the old users
> based on CISM LDAP status (inactive account since 2 years)
- (&(objectClass=person)(expirationDate>=202301010000+0100))
- (&(&(objectClass=person)(expirationDate>=202301010000+0100))(uid=%uid))
- remove new remnants users (after LDAP filters changes)
> change the LDAPinterval (default: 51min for 50 users test)
'ldapUserCleanupInterval' => 5,
- remove the external mounts with
02_delete_all_external.sh
> take a while (~3h)
- remove the guests users
>
sudo -u apache php occ user:list | grep "Guest"
> sudo -u apache php occ user:list | grep "@"
- Nextcloud data relief
- remove the cache in the DB (unofficial)
> oc_filecache (> 54789 MB)
>
sudo -u apache php occ files:scan -vvv --all
- ?? remove the shared files and folders ??
- Start the instance and check it
- Halt NC host and:
- rsync the mysql folder from DB host
- rsync the Nextcloud folder from NC host
- rsync the NC data folder from NC host
Migration files --> S3
- Disable cron:
mv /etc/cron.d/nextcloud /var/www/html/nextcloud/etc_cron.d_nextcloud
- Apply
nextcloud-S3-local-S3-migration
- Check the instance
- Enable cron
!!! S3 migration: external mounts lost & shared files lost !!!
Nextcloud improved + S3
- Deploy a new Nextcloud instance (S3) with OpenStack (same NC release + MariaDB 10.5.11)
> minimum 200GB for DB host, minimum 200GB for NC
- Halt NC on Vagrant host and
- rsync the mysql folder
- rsync the Nextcloud folder
- rsync the NC data folder
- Start the new instance and check it