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

Bug: WebDav backup not working #6776

Open
meichthys opened this issue Dec 26, 2023 · 16 comments
Open

Bug: WebDav backup not working #6776

meichthys opened this issue Dec 26, 2023 · 16 comments

Comments

@meichthys
Copy link
Contributor

Description

This is to re-open #5688 (comment)

Entering WebDav credentials, enabling remote backup, and saving backup to remote doesn't seem to save the backup file to the WebDav server:
image

  • ChurchCRM version: 5.3.1
  • PHP version is the server running: 8.2
  • DB Server and Version are you running:
    ChurchCRM Database Version | 5.3.1
    Database Server Version | 10.5.23-MariaDB-log
    DSN | mysql:host=localhost;port=3306;dbname=firstb20_churchcrm

Steps To Reproduce

  1. Go to Admin > Edit General Settings > Backup
  2. Update remote settings (use WebDav)
  3. Save
  4. Go To Admin > Backup Database > Generate and Ship Backup to External Storage

Expected behavior
Backup file should be saved to remote WebDav server

Debugging Steps
The webUI indicates that the backup succeeded:
image

However, the file is not saved to WebDav server. App log shows:

[2023-12-26T19:51:42.736422+00:00] defaultLogger.ERROR: Error copying backup: Exception: Error backing up to remote: necessary data rewind wasn't possible in /home/firstb20/church.us-church.org/ChurchCRM/Backup/BackupJob.php:88 Stack trace: #0 /home/firstb20/church.us-church.org/api/routes/system/system-database.php(61): ChurchCRM\Backup\BackupJob->copyToWebDAV('https://nextclo...', 'user', 'password...') #1 [internal function]: Closure->{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Array) #2 /home/firstb20/church.us-church.org/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func(Object(Closure), Object(Slim\Http\Request), Object(Slim\Http\Response), Array) #3 /home/firstb20/church.us-church.org/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(Slim\Http\Request), Object(Slim\Http\Response), Array) #4 /home/firstb20/church.us-church.org/ChurchCRM/Slim/Middleware/Request/Auth/BaseAuthRoleMiddleware.php(28): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response)) #5 [internal function]: ChurchCRM\Slim\Middleware\Request\Auth\BaseAuthRoleMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route)) #6 /home/firstb20/church.us-church.org/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ChurchCRM\Slim\Middleware\Request\Auth\AdminRoleAuthMiddleware), Array) #7 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route)) #8 /home/firstb20/church.us-church.org/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route)) #9 /home/firstb20/church.us-church.org/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response)) #10 /home/firstb20/church.us-church.org/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response)) #11 /home/firstb20/church.us-church.org/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response)) #12 /home/firstb20/church.us-church.org/ChurchCRM/Slim/Middleware/VersionMiddleware.php(13): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response)) #13 [internal function]: ChurchCRM\Slim\Middleware\VersionMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App)) #14 /home/firstb20/church.us-church.org/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ChurchCRM\Slim\Middleware\VersionMiddleware), Array) #15 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App)) #16 /home/firstb20/church.us-church.org/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App)) #17 /home/firstb20/church.us-church.org/ChurchCRM/Slim/Middleware/AuthMiddleware.php(33): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response)) #18 [internal function]: ChurchCRM\Slim\Middleware\AuthMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure)) #19 /home/firstb20/church.us-church.org/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(ChurchCRM\Slim\Middleware\AuthMiddleware), Array) #20 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure)) #21 /home/firstb20/church.us-church.org/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure)) #22 /home/firstb20/church.us-church.org/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response)) #23 /home/firstb20/church.us-church.org/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response)) #24 /home/firstb20/church.us-church.org/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response)) #25 /home/firstb20/church.us-church.org/api/index.php(83): Slim\App->run() #26 {main} [] {"url":"/api/database/backupRemote","remote_ip":"74.67.79.83","correlation_id":"658b2ecdb7f87"}

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Firefox 120

Additional context
My suspicion is that this may be related to my shared hosting server. I do not have access to all server settings, so i am somewhat limited in my configuration options. Sorry for the screenshot, but debug shows:
image

@meichthys meichthys added the bug label Dec 26, 2023
@DAcodedBEAT
Copy link
Contributor

@meichthys just to fully understand the operating environment, what application/server are you using for WebDAV? It would be nice to have this covered in the docker test environment.

@meichthys
Copy link
Contributor Author

meichthys commented Dec 26, 2023

I'm running Nextcloud v28 (Apache2, PHP8.2, Postgresql 14)

@DawoudIO
Copy link
Contributor

Can you give this a try with the latest version? 5.4.1

@DAcodedBEAT
Copy link
Contributor

@DawoudIO I wouldn't expect this to work with the new code. This code path needs to be vetted more (with CI tests)

@meichthys
Copy link
Contributor Author

No difference on v5.4.2

@DawoudIO
Copy link
Contributor

DawoudIO commented Jan 2, 2024

Any chance you provide a temp web dev account to test with ?

@meichthys
Copy link
Contributor Author

meichthys commented Jan 3, 2024

@DawoudIO Sure. Could you provide an email to send the credentials to?

@DAcodedBEAT
Copy link
Contributor

@DawoudIO this should probably be developed and added to the test environment. I think we can add https://github.com/drakkan/sftpgo to the docker compose to test against.

Copy link
Contributor

github-actions bot commented Feb 2, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Feb 2, 2024
@DAcodedBEAT DAcodedBEAT removed the Stale label Feb 2, 2024
@DAcodedBEAT DAcodedBEAT self-assigned this Feb 2, 2024
Copy link
Contributor

github-actions bot commented Mar 4, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Mar 4, 2024
@DAcodedBEAT DAcodedBEAT removed the Stale label Mar 7, 2024
Copy link
Contributor

github-actions bot commented Apr 7, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Apr 7, 2024
@DAcodedBEAT DAcodedBEAT removed the Stale label Apr 9, 2024
Copy link
Contributor

github-actions bot commented May 9, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label May 9, 2024
@DAcodedBEAT DAcodedBEAT removed the Stale label May 9, 2024
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jun 26, 2024
@respencer respencer removed the Stale label Jun 26, 2024
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants