allow configuring multiple object store backends#52786
Merged
icewind1991 merged 4 commits intomasterfrom Aug 14, 2025
Merged
Conversation
cf36e0c to
95a019a
Compare
95a019a to
5c33aec
Compare
b2923b0 to
77b1e72
Compare
16533d5 to
077003d
Compare
14b8f17 to
2acc97c
Compare
6440956 to
4a27074
Compare
come-nc
reviewed
Aug 4, 2025
| $query = $this->connection->getQueryBuilder(); | ||
| $query->update('preferences') | ||
| ->set('configvalue', $query->createNamedParameter($target)) | ||
| ->where($query->expr()->eq('appid', $query->createNamedParameter('homeobjectstore'))) |
Contributor
There was a problem hiding this comment.
That’s not an appid
What about using core?
Member
Author
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.
53b0d3b to
404bce1
Compare
salmart-dev
approved these changes
Aug 8, 2025
Contributor
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.
come-nc
approved these changes
Aug 14, 2025
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
4990d75
Compare
Merged
14 tasks
Member
Author
|
/backport to stable31 |
2 tasks
This was referenced Nov 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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