Skip to content
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

Only move data files to an external disk #271

Closed
Tracked by #127
sim-san opened this issue Feb 23, 2022 · 7 comments · Fixed by #326
Closed
Tracked by #127

Only move data files to an external disk #271

sim-san opened this issue Feb 23, 2022 · 7 comments · Fixed by #326
Labels
2. developing Work in progress enhancement New feature or request mid term

Comments

@sim-san
Copy link

sim-san commented Feb 23, 2022

In the Readme, you mentioned the possibility to move the complete docker directory on an external disk. how-to-store-the-filesinstallation-on-a-separate-drive.

Do you plan to support an option to only store the data files on an external mount like the nextcloud docker image ?

$ docker run -d \
-v nextcloud:/var/www/html \
-v apps:/var/www/html/custom_apps \
-v config:/var/www/html/config \
-v data:/var/www/html/data \
-v theme:/var/www/html/themes/<YOUR_CUSTOM_THEME> \
nextcloud

see nextcloud docker | persistent data

Background:
I want to host Nextcloud AIO on an Azure VM and use an blob storage mounted with blobfuse to have an cheap storage location. In order not to endanger the stability of the containers, I would like to mount only the data files on the blobfuse mount

@szaimen
Copy link
Collaborator

szaimen commented Feb 23, 2022

Hello,

that sounds interesting what you are trying to achieve here.
If I understand your request correctly, you want to change the default datadir of Nextcloud to a custom directory on your host. Correct?
Such an option is currently not planned.

What about using this new option: https://github.com/nextcloud/all-in-one#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host to mount a custom directory into the container and make it in Nextcloud available using local external storage? Would that work? (it will like this though not be covered by the built-in backup solution).

Another option would be using the external storage app to mount s3 storage into Nextcloud... (also not covered by the built-in backup solution).

Apart from that we are actually already using docker volumes as described in the by you linked readme about persistent storage. What you are probably looking for is the docker volume nextcloud_aio_nextcloud_data which is by default located here: /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/

@szaimen szaimen added enhancement New feature or request needs info Not enough information provided labels Feb 23, 2022
@sim-san
Copy link
Author

sim-san commented Feb 24, 2022

If I understand your request correctly, you want to change the default datadir of Nextcloud to a custom directory on your host. Correct?

Yes, correct.

What you are probably looking for is the docker volume nextcloud_aio_nextcloud_data which is by default located here: /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/

yes, this would what I am looking for.

@sim-san
Copy link
Author

sim-san commented Feb 24, 2022

What about using this new option: https://github.com/nextcloud/all-in-one#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host to mount a custom directory into the container and make it in Nextcloud available using local external storage? Would that work? (it will like this though not be covered by the built-in backup solution).

Is it possible that all data of all users are on the external storage and it does not look to the users that this is an extra folder ?

@szaimen
Copy link
Collaborator

szaimen commented Feb 25, 2022

Is it possible that all data of all users are on the external storage and it does not look to the users that this is an extra folder ?

Yes but it is not as straight forward as using the normal datadir and not covered by the built in backup solution as I said.

@szaimen szaimen added help wanted Extra attention is needed mid term and removed needs info Not enough information provided labels Feb 25, 2022
@david-steg
Copy link

I would be also very interessted about having the possibility to change the docker Volume "nextcloud_aio_nextcloud_data" to a Mount on the Host. Like /mnt/nextcloud/data instead of /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/.
In this case I could properly mount a NFS or CIFS Share to this folder.
Mounting a Share into the Docker Volume Path doesn't sound like a clean solution.
Would be that possible with a ENV. VAR. like "NEXTCLOUD_DATA_DIR"?

@szaimen
Copy link
Collaborator

szaimen commented Mar 5, 2022

Would be that possible with a ENV. VAR.

Yes, it will be implemented with an environmental variable 👍

@szaimen szaimen added 2. developing Work in progress and removed help wanted Extra attention is needed labels Mar 8, 2022
@szaimen
Copy link
Collaborator

szaimen commented Mar 9, 2022

This is now implemented with v0.7.0. Here are some docs on this: https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2. developing Work in progress enhancement New feature or request mid term
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants