Apparently nobody’s tried this before–or if they have, they don’t read here. For the sake of posterity, here’s what I’ve tried so far between a couple of test VMs.
Pretty much following the steps I outlined above. The Users page on the old and new Nextcloud installations made it simple enough to correlate the old and new UUIDs to their respective users. Midnight Commander made it fairly straightforward to move the data directories to the right place while renaming them appropriately.
My test source VM didn’t have anything in
oc_files_trash, so I didn’t need to mess with that table. I replaced the UUIDs, one by one, in the
affecteduser columns of
oc_activity, and then copied that table over to the database for the new installation. I also copied over the
oc_filecache table unchanged. I probably should have put Nextcloud in maintenance mode while doing this, but I didn’t for this test.
Result is that I’m able to log in to the new Nextcloud installation as any of the users who had files in the old installation, and see those files. This is looking like a success.
Would still appreciate any input into other tables that should be copied, with or without changes.
Edit: Well, I think I’ve found one other table. In the
oc_share table, the same find/replace would be needed in
share_with. Wasn’t an issue on my test install as I hadn’t shared anything.
user column should be updated. Looks like the same is needed for the
oc_uid column in both