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

Different "datadirectory" in CLI mode possible? #365

Closed
sokai opened this issue Mar 30, 2021 · 3 comments
Closed

Different "datadirectory" in CLI mode possible? #365

sokai opened this issue Mar 30, 2021 · 3 comments

Comments

@sokai
Copy link

sokai commented Mar 30, 2021

Hi,

on a shared hosting I have differen paths for web/HTTP and CLI.

My current solution comes from nextcloud/server#19181 (comment) and it works very well wil the occ CLI command.

I created the file config/local.config.php with this content:

<?php

$local = [
    'datadirectory' => '/domains/[…]/[…]/nextcloud_data',
    'tempdirectory' => '/domains/[…]/[…]/nextcloud_data/tmp'
];

if ( \OC::$CLI )
{
    // CLI config parameters
    $CONFIG['datadirectory'] = $local['datadirectory'];
    $CONFIG['tempdirectory'] = $local['tempdirectory'];
} else {
    $web_path = '/var/www/vhosts/[…]';
    // WEB config parameters
    $CONFIG['datadirectory'] = $web_path . $local['datadirectory'];
    $CONFIG['tempdirectory'] = $web_path . $local['tempdirectory'];
}

Currently I try to run updater.phar, but I get this error message:

Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4

PHP Warning: fopen(/var/www/vhosts/[…]/domains/[…]/[…]/nextcloud_data/updater.log): failed to open stream: No such file or directory in phar:///domains/[…]/[…]/nextcloud/updater/updater.phar/lib/Updater.php on line 1110
Could not open updater.log

So: Can you plz tell me (or maybe implement it?), how I can use different paths for datadirectory while using the updater.phar?

I need such an option because running the web version of the updater gets regularly stuck during the backup step and I wanna have a proper upgrade solution. (And I'm not the only one, like you can see in a second comment: nextcloud/server#19181 (comment).)

Thanks and BK!

@MorrisJobke
Copy link
Member

Hi @sokai, as of now there is no plan to implement such a feature, because it is really special to your shared hoster setup. Unfortunately we can't support all of them out there. We recommend to use a VPS instead to run Nextcloud.

@sokai
Copy link
Author

sokai commented Apr 2, 2021

@MorrisJobke Thank you for the feedback!

Let me say that I agree with the basic message, that you will not implement it and I see the VPS point (but currently I have no other option).

But: Is there a possibility to have this featere as a user contribution (that you can merge by a PR)? E.g. I would/could try to find a way to add a new command option (like no-backup).

Thanks in advance + KR!

@MorrisJobke
Copy link
Member

The user contribution still adds the burden of maintaining it on our side. It adds complexity that we need to deal with. There are then corner cases that always need to be tested, etc.

so most likely we will not accept the PR. Sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants