-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate from local volume (nextcloud / data) to s3 after adding s3 to config.php #25781
Comments
I did do this manual with this manual: https://pedal.me.uk/migrating-a-nextcloud-instance-to-amazon-s3/ |
It's great. I will try this option. But it would also be very nice if there was a ready-made solution in occ |
As this sounds like a nice feature, the requests for this are quite low. Currently there are no plans to implement such a feature. Thus I will close this ticket for now. This does not mean we don't want this feature, but it is simply not on our roadmap for the near future. If somebody wants to implement this feature nevertheless we are happy to assist and help out.If you wish to have this feature implemented by the Nextcloud GmbH there is the option for consulting work on top of your Nextcloud Enterprise subscription to get your features implemented. |
Sadly, the site is offline - domain name does not even resolve.. |
This was copied from https://pedal.me.uk/migrating-a-nextcloud-instance-to-amazon-s3/ in case his domain ever goes offline again. All credit for this belongs to the original author and was copied here to ensure a lasting copy exists. *** Steps To Migrate***1 – Kick off your users 2 – Backup your instance 3 – Rearrange your data directory My Data directory was /srv/nextcloud. My Nextcloud database is called nextcloud_db You will need to change these to match your own setup. When you are done you should end up with a directory full of files named something like urn:oid:1234. At the command line I typed the following: Get the user files
Get the meta files
4 – Copy your files to S3
Actually copying can take some time, particularly if you have > 10GB.
5 – Update Nextcloud to Use S3. This step can damage your nextcloud instance! Previous steps do not damage or change your Nextcloud instance because you were working on a copy of everything. Now you are about to change your existing Nexcloud instance. Please don’t follow these steps blindly. Take the time to understand what you are doing first. Again on the command line type:
Then add the the extra configuration item to config/config.php
|
Has anyone tried these steps with any success? So far in my research this seems like the only documentation of any kind of migration path. Would the other option be start from scratch on a new server and import settings? Is that even possible? |
@SNThrailkill The export process worked well, although there are a few hidden characters in the markdown code. Otherwise, the migration worked great. And because symlinks take nearly no space, this is also an option for instances where the HDD is almost full. |
@thelfensdrfer thank you for the confirmation! Highly encouraging to hear. I'll try this out soon. Hopefully no issues too big. |
Yeah have used essentially the same process 2 or 3 times now without any major issues. |
For those interested that might bump into this when researching the matter, you also need to change the If you don’t, shares would be messed up and you would end up with a lot of errors when dealing with editing files, displaying images, etc… |
I built a script that "does it all", migrate, check stuff, test, update, "pre migrate" (minimal downtime!) and even perform a "sanity check" (like https://github.com/mrAceT/nextcloud-S3-local-S3-migration |
Both of your solutions assume MySQL is used, but my Nextcloud instance uses PostgreSQL. |
Yeah, also looking for a solution for PostgreSQL. Did you find a solution? |
Hi All, Thanks for the good info everyone. I just migrated from local (/data) to S3 storage and initial testing shows it was a success. See my notes below. My server is currently running CentOS7 and this is the first step before migrating to a Fedora39 server. I do have one question regard updating the oc_mounts and mount_provider_class value. I only updated the rows with mount_provider_class = 'OC\Files\Mount\LocalHomeMountProvider'. Should I update them all? Other values are 'OCA\Files_Sharing\MountProvider' and NULL. I hit one error when updating the oc_storages table for 'local::' entries as I had two. One was an old entry that no longer existed. I removed the redundant row and reran successfully. I used rclone to sync the files with the goal to preserve the timestamps and this appears to have been successful. If I download a file from the S3 bucket using 'rclone copy' the timestamp matches the original.
|
Lacks functionality to migrate from local volume (nextcloud / data) to s3 after adding s3 to config.php via occ.
Add two repositories to config.php
The text was updated successfully, but these errors were encountered: