No description
Find a file
Andy Scherzinger 0bcdc0f0d3
Merge pull request #5 from nextcloud/automated/update-workflows/default
chore: update workflows from templates
2024-07-13 14:28:27 +02:00
.github/workflows chore: update workflows from templates 2024-07-13 10:48:05 +02:00
appinfo test back to nc15 2021-11-09 17:42:46 +01:00
lib Fix codestyle 2023-08-07 13:12:28 +02:00
stubs try and fix psalm stubs 2022-11-09 16:20:32 +01:00
.gitignore init 2021-11-04 17:19:14 +01:00
.nextcloudignore lints etc 2021-11-09 17:30:50 +01:00
.php_cs.dist lints etc 2021-11-09 17:30:50 +01:00
ci-config.php lints etc 2021-11-09 17:30:50 +01:00
composer.json lints etc 2021-11-09 17:30:50 +01:00
composer.lock lints etc 2021-11-09 17:30:50 +01:00
krankerl.toml init 2021-11-04 17:19:14 +01:00
psalm.xml lints etc 2021-11-09 17:30:50 +01:00
README.md update readme warning 2023-01-12 17:44:48 +01:00

Multibucket Migrate

Allow moving users between buckets in a multibucket setup.

⚠ Because this app modifies filesystem internals, backups are strongly recommended ⚠

Usage

Move all objects owned by a user to a different bucket.

occ multibucket_migrate:move_user <user_id> <target_bucket>

Note: this can take a long time if the user owns a lot of data

Manual migration

This app can also be used to assist in a more manual migration

  • Disable the user to migrate: occ user:disable <user_id>
  • Get the current bucket for the user: occ user:setting <user_id> homeobjectstore bucket
  • List all objects owned by the user: occ multibucket_migrate:list <user_id>
  • Move all listed objects to the target bucket
  • Save the new bucket for the user: occ user:setting <user_id> homeobjectstore bucket <target_bucket>
  • Re-enable the user: occ user:enable <user_id>

Note that it's important that this app stays enabled during the migration as it includes logic to ensure shares owned by disabled users are readonly, preventing accidental writes to objects owned by the user being migrated.

Listing all users using a bucket

You can get all users who are using a specific bucket by using

occ multibucket_migrate:by-bucket <bucket>

Listing all object owned by a user

You can get a list of all object belonging to a users home storage by using

occ multibucket_migrate:list <user_id>