By xr1s
Hi DO community,
For the life of me, I can’t figure out how to move the data folder for a snap Nextcloud I installed on a Droplet. I have 150GB of Block Storage that I want to use for the data folder. The little guideline I made and the steps I took:
lsblk mkfs -t ext4 /dev/sda mkdir -p /mnt/nextcloud_data mount -o discard,defaults /dev/sda /mnt/nextcloud_data lsblk sudo snap connect nextcloud:removable-media nano /var/snap/nextcloud/current/nextcloud/config/config.php sudo snap stop nextcloud sudo mv /var/snap/nextcloud/common/nextcloud/data /mnt/nextcloud_data sudo snap start nextcloud
In config, I setup data directory as /mnt/nextcloud_data …and now I get:
Your data directory is invalid Ensure there is a file called “.ocdata” in the root of the data directory
Any ideas on what went wrong?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello, @xr1s
You can probably refer to this article from Next Cloud’s forum:
I will recommend you to first manually create the .ocdata file and try again before removing the users and re-create them from scratch.
In order to create the file, you can simply use touch :
- touch .ocdata
Regards, Alex
Heya,
Additionally, after making these adjustments, restart the Nextcloud snap:
- sudo snap start nextcloud
If you’re still encountering issues, check the Nextcloud logs for more specific error messages that might provide additional clues about the problem. You can find Nextcloud logs in the /var/snap/nextcloud/common/nextcloud/data/nextcloud.log file or use the Nextcloud web interface to access the logs.
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.