nextcloud / user_migration

This app allows users to easily migrate from one instance to another using an export of their account
https://apps.nextcloud.com/apps/user_migration
GNU Affero General Public License v3.0
15 stars 7 forks source link

Behaviour for versioned files on external storage #322

Open TheDom42 opened 1 year ago

TheDom42 commented 1 year ago

First of all: thank you for implementing such a much-needed tool!

I was thinking about using the tool migrating from a NC standalone docker to the AIO docker on an Unraid system. In the old docker, most of my actual user files are mounted as external storage (this is a common practice on Unraid for Nextcloud installations - e.g. look at https://www.youtube.com/watch?v=mOHOcgVMLGM). Now I know that with v2.0.1 of this plugin, external storages are by default not part of the archive anymore (which I think is in line with the expected behavior). However, I'm unsure about the database for the versions of the files on that storage. Is this migrated? If so, how?

Related to that is the question for me: what is the correct migration procedure if one uses external storage and versioning? Should I unmount the external (local) storage from the old container first? Should I remap them as external storage to the new container before importing the migration file (I assume)? What needs to be prepared to not completely mess up the database and files?

The point I'm making: is there already documentation available on the caveats etc. when using this plugin together with external storages?

Thank you!

Pytal commented 1 year ago

The expert @come-nc may have some ideas?

come-nc commented 1 year ago

I was thinking about using the tool migrating from a NC standalone docker to the AIO docker on an Unraid system. In the old docker, most of my actual user files are mounted as external storage (this is a common practice on Unraid for Nextcloud installations - e.g. look at https://www.youtube.com/watch?v=mOHOcgVMLGM). Now I know that with v2.0.1 of this plugin, external storages are by default not part of the archive anymore (which I think is in line with the expected behavior). However, I'm unsure about the database for the versions of the files on that storage. Is this migrated? If so, how?

In theory it should not as external storage is excluded, but I think it does in practice because the whole versions folder is exported and I think files_external stores versions there as well.

Related to that is the question for me: what is the correct migration procedure if one uses external storage and versioning? Should I unmount the external (local) storage from the old container first? Should I remap them as external storage to the new container before importing the migration file (I assume)? What needs to be prepared to not completely mess up the database and files?

This is not officially supported but I would try:

  1. Export from old installation
  2. Create the account on the new one
  3. Migrate the external storage
  4. Make sure external storage is at the same path as old installation
  5. Import the archive

The point I'm making: is there already documentation available on the caveats etc. when using this plugin together with external storages?

No, but you’re welcome to start some with your foundings :-)