Uh oh!
There was an error while loading. Please reload this page.
allow configuring multiple object store backends - #52786
Conversation
cf36e0c to
95a019aCompare95a019a to
5c33aecCompareb2923b0 to
77b1e72Compare16533d5 to
077003dCompare14b8f17 to
2acc97cCompare6440956 to
4a27074CompareUh oh!
There was an error while loading. Please reload this page.
| $query = $this->connection->getQueryBuilder(); | ||
| $query->update('preferences') | ||
| ->set('configvalue', $query->createNamedParameter($target)) | ||
| ->where($query->expr()->eq('appid', $query->createNamedParameter('homeobjectstore'))) |
There was a problem hiding this comment.
That’s not an appid
What about using core?
There was a problem hiding this comment.
Having a separate "scope" makes it much easier to work with the values in bulk (see for example the query in the rename command).
Fwiw: homeobjectstore is already used as an appid for storing the bucket for the user.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
53b0d3b to
404bce1Compare
salmart-dev
left a comment
There was a problem hiding this comment.
I'm not familiar with the object store, but the logic here makes sense in accordance to the PR's description.
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
404bce1 to
4990d75CompareUh oh!
There was an error while loading. Please reload this page.
icewind1991
commented
Nov 20, 2025
/backport to stable31 |
Allow configuring multiple object store backends to allow further load balancing and easier migration.
Configuration
Multiple object stores are configured by setting the
objectstoresystem config to an array of object storage configurations instead of a single configuration. This array can contains both configuration items and references to other configuration keys (which functions as an alias).When a the configured bucket for a user is an alias, the target of the alias is stored as the users chosen configuration instead to make migrations easier.
The "default" option is required to be an alias to prevent instances from accidentally being setup in a way that makes migration difficult.
By default everything is put in the "default" bucket, objects for the root storage are put in the "root" bucket if it exists ("default" if it doesn't), the backend for users can be set with a user preference option (
occ user:setting <user> homeobjectstore objectstore <config key>).Existing
objectstoreandobjectstore_multibucketconfigurations are handled transparently.Migration example
Migrating users to a new s3 server could be done with the following steps:
defaultreference to the new configuration.all new users will now be stored on the new s3 server, existing users can now be migrated one-by-one with minimal downtime
example configuration:
For a use case where all objects in the root storage is put in "objectstore1/nextcloud-root", users created before the objectstore migration have the "homeobjectstore.objectstore" config option set to "old" and have their objects stored in "objectstore1/nextcloud" which all users created afterwards have their objects stored in the "objectstore2/nextcloud-XX" buckets.
todo