We have an instance using S3 as primary storage. We we’re planning to move it from one server to another, problem is that after moving it (different server, different providers for both servers and S3), any GroupFolders folder is…EMPTY.
Problem is inexistant if there is no GroupFolders involved, using the migration plan above.
Step of migration
While in maintenance mode:
rsync all /public folder contents from one server to another
mysqldump --single-transaction nextcloud > nextcloud.sql and import on the new server
Adjust config.php to use new credentials
Using rclone or mc (tried with both), sync all content from one S3 provider to another. At the end, the two S3 buckets match perfectly (number of objects, size, and each object matches it’s MD5).
Switch OFF maintenance mode on new server, and log in.
So at the end:
same files (code base)
same contents on S3 buckets
same SQL base (same MySQL version on old and new servers)
all operations done while NC was in maintenance mode
Power-up new instance by switching DNS entries (hosts file in my case), every group folder is EMPTY on the new instance. All folders are there, but empty. Everything that is NOT on a GroupFolder, is completely fine (files, shares, activities, users, calendars…). So the problem is somewhere with GroupFolder not detecting its contents on the new S3 bucket…
Also, every GroupFolder folder has a modified date as “Few seconds ago” just after log in to the new instance, which of course is not true. But maybe this is a lead to find the root cause.
We’ve tried this procedure moving from S3 > S3 or from S3 > SWIFT, the result is the same. We’ve switched many Nextcloud instances not using GroupFolders, using the above procedure, no problems.