Snap: How to change Collectives data folder?

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 33.05
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04
  • Web server and version (e.g, Apache 2.4.25):
    • Not changed from Snap default
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Not changed from Snap default
  • PHP version (e.g, 8.3):
    • Not changed from Snap default
  • Is this the first time you’ve seen this error? (Yes / No):
    • Not an error, this is a help request
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Snap
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

I have a new install of Nextcloud Snap, and I’d like to move the Collectives data folder from another instance to this one.

Collectives provides a UI for changing the data folder, but it doesn’t work as expected. When I select the desired folder, it renames it (appended with “1”), and then creates a new, empty folder at the location I’d chosen.

Alternatively, I’d also tried dragging the files from the old folder to the assigned Collectives data folder, but get the mystifying error “No files to process”, which I suspect is actually a permissions error.

What is the best method for moving Collectives data from one instance to another?

at the left site, buttom you can change it.

Thank you, but that was the feature I was referring to when I wrote:

"“Collectives provides a UI for changing the data folder, but it doesn’t work as expected. When I select the desired folder, it renames it (appended with “1”), and then creates a new, empty folder at the location I’d chosen.”

Is there a way to make it accept an existing folder and its contents?

make a backup of you new directory, make a new collective and change the path in collective settings.

The files should be in .mn format for collective. Try it out, good luck.

Thank you. I can create new Collectives just fine, but I’m hoping to find a way to bring in the .md Collectives files I’ve backed up from another instance.

I’m unable to move or copy them to the folder Collectives uses, and when I try to change Collectives’ Setting to use my desired folder of existing .md files it instead creates a new one with that name, and renames my desired older by adding “(1)”, and never uses those files.

Hi @RGaskin

Collectives are managed by the collectives app and their data on the server side of things is stored in the appdata folder. The collectives app then mounts this folder into the configured collectives folders of all members. That’s why you cannot simply write to that folder to transfer a collective.

What you need to do instead is create a new collective and then copy the content into this collective.

There are different ways to copy over the data:

As an admin using occ commands on the command line

occ collectives:import:markdown /tmp/oldCollective -c 123 -u bob -p 0

The options are:

  • the directory where your old collective is stored
  • -c The id of the collective you want to import into (Number at the end of the url of the collective)
  • -u User to import the pages as
  • -p Page to use as the parent page of all pages (0 for root).

All of those are required.

As a user using the web interface

You can also visit the collective folder in the files app and upload the files in question to the folder.

As a user using the sync client

You can also sync the collectives folder to your local computer and copy the files over there.

I hope one of these options is viable for you.

Curious. After discovering I can’t move files from other folders into the Collectives folder, it never occurred to me that I could first download them and then upload them into the Collectives folder.

A bit tedious to create each of the Collectives as I went, but it went swimmingly.

Thank you for the suggestion.

To my understanding you should be able to move files into the new collective. It’s just that you cannot put anything into the collectives folder itself - only into individual collectives.