Closed Alexis-IMBERT closed 1 week ago
hi!
if the dir path changed and a folder exists at the old location, the folder will be mv'ed to the new location
it's because the docs explain the app provisionning, which occurs before the install/upgrade/restore scripts
there is no data moving where you're changing it's path using the yunohost app setting nextcloud datadir -v /new/data/path
command, because it's not designed to
@OniriCorpe Thank you for youre answer, So this way to change the data directory is still accurate ? (even if the doc is deprecated)
@Alexis-IMBERT there is a typo in the command: this is data_dir
instead of datadir
then the command will effectively update the settings.yml
Hi @niko2 thank you for notice that,
This is indeed the command I used with data_dir
. I corrected my first comment.
What could be the step to produce a generic script that change the data folder of Nextcloud
And I just notice that if we do an upgrade of the app :
sudo yunohost app setting nextcloud data_dir
The data folder come back to the default one :
sudo yunohost app setting nextcloud data_dir
/home/yunohost.app/nextcloud
Yes, you can refer to https://github.com/YunoHost-Apps/nextcloud_ynh/issues/675 Customizing data dir is not supported, apart from using a bind mount I will try this way and eventually document it
I made a symbolic link and it seems to work (I could do the upgrade to the latest version of nextcloud)
@niko2 thank you for your test !
Did you do a symbolic link (ls -s ) or a bind mount (mount --bind) ?
as I said, a symbolic link (ln -s
)
I tested it too on my server, I don't get any trouble, so I push the doc (fr and en) on that MR : https://github.com/YunoHost-Apps/nextcloud_ynh/pull/670
Closing because the original issue seem to be addressed and there are followup PRs
Describe the bug
The following command to change the data directory of an app doesn't work properly :
The command was suggested in this thread to change properly the data directory of Nextcloud and not break fail2ban.
In the documentation here, it say that if the directory exist, the data are moved and if it doesn't, it will the directory is created.
But I try it on my server (new clean install) and it doesn't moved the data, the new directory still doesn't exist... However, the result of the following command change from the default path to the new one :
Context
yunohost app info $app_id
Steps to reproduce
Expected behavior
The solution could simply be an explanation of how to change the data directory properly (it's really relevant for using get Nextcloud on an bigger drive space than the one of Yunohost is running)
The best option will be a new configuration option on the web administration
PS : With explanation on what to do, I will be pleased to help on the development of this feature
Thank you of your help and investment