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

Upgrade Nextcloud 14 : Copy error step 3 backup #10627

Closed
quentinDupont opened this issue Aug 9, 2018 · 7 comments
Closed

Upgrade Nextcloud 14 : Copy error step 3 backup #10627

quentinDupont opened this issue Aug 9, 2018 · 7 comments

Comments

@quentinDupont
Copy link

Upgrade for Nextcloud Beta 3 end to step 3.

Steps to reproduce

  1. Use the upgrader in admin panel
  2. Error in Backup step 3 "Could not copy "/var/www/nextcloud/config/config.php.bak" to "/var/nc_data/updater-oct4dzqp3hji/backups/nextcloud-13.0.5.2/config/config.php.bak"

Server configuration

Operating system:
Ubuntu 18.04

Web server:
Nginx

Database:
MariaDB

PHP version:
PHP 7.2.8

Nextcloud version: (see Nextcloud admin page)
13.0.5

Updated from an older Nextcloud/ownCloud or fresh install:
Fresh install

Log

2018-08-09T18:42:46+0200 uyi8GIffYf [info] Step 1 is in state "end".
2018-08-09T18:42:46+0200 uyi8GIffYf [info] POST request for step "2"
2018-08-09T18:42:46+0200 uyi8GIffYf [info] startStep("2")
2018-08-09T18:42:46+0200 uyi8GIffYf [info] checkWritePermissions()
2018-08-09T18:42:46+0200 uyi8GIffYf [info] end of checkWritePermissions()
2018-08-09T18:42:46+0200 uyi8GIffYf [info] endStep("2")
2018-08-09T18:42:46+0200 uewOsoT5hG [info] request to updater
2018-08-09T18:42:46+0200 uewOsoT5hG [info] currentStep()
2018-08-09T18:42:46+0200 uewOsoT5hG [info] Step 2 is in state "end".
2018-08-09T18:42:46+0200 uewOsoT5hG [info] POST request for step "3"
2018-08-09T18:42:46+0200 uewOsoT5hG [info] startStep("3")
2018-08-09T18:42:46+0200 uewOsoT5hG [info] createBackup()
2018-08-09T18:42:53+0200 uewOsoT5hG [error] POST request failed with other exception
2018-08-09T18:42:53+0200 uewOsoT5hG [error] Exception: Exception
Message: Could not copy "/var/www/nextcloud/config/config.php.bak" to "/var/nc_data/updater-oct4dzqp3hji/backups/nextcloud-13.0.5.2/config/config.php.bak"
Code:0
Trace:
#0 /var/www/nextcloud/updater/index.php(1291): Updater->createBackup()
#1 {main}
File:/var/www/nextcloud/updater/index.php
Line:503

2018-08-09T18:42:53+0200 uewOsoT5hG [info] rollbackChanges("3")
2018-08-09T18:42:53+0200 uewOsoT5hG [info] unlink .step
2018-08-09T18:42:53+0200 uewOsoT5hG [info] end of rollbackChanges()

Config

{
"system": {
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"localhost",
"mydomain.fr"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"overwrite.cli.url": "mydomain.fr",
"dbtype": "mysql",
"version": "13.0.5.2",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"instanceid": "REMOVED SENSITIVE VALUE",
"activity_expire_days": 14,
"auth.bruteforce.protection.enabled": true,
"blacklisted_files": [
".htaccess",
"Thumbs.db",
"thumbs.db"
],
"cron_log": true,
"enable_previews": true,
"enabledPreviewProviders": [
"OC\Preview\PNG",
"OC\Preview\JPEG",
"OC\Preview\GIF",
"OC\Preview\BMP",
"OC\Preview\XBitmap",
"OC\Preview\Movie",
"OC\Preview\PDF",
"OC\Preview\MP3",
"OC\Preview\TXT",
"OC\Preview\MarkDown"
],
"filesystem_check_changes": 0,
"filelocking.enabled": "true",
"htaccess.RewriteBase": "/",
"integrity.check.disabled": false,
"knowledgebaseenabled": false,
"logfile": "/var/nc_data/nextcloud.log",
"loglevel": 2,
"logtimezone": "Europe/Berlin",
"log_rotate_size": 104857600,
"maintenance": false,
"memcache.local": "\OC\Memcache\APCu",
"memcache.locking": "\OC\Memcache\Redis",
"overwriteprotocol": "https",
"preview_max_x": 1024,
"preview_max_y": 768,
"preview_max_scale_factor": 1,
"redis": {
"host": "REMOVED SENSITIVE VALUE",
"port": 0,
"timeout": 0
},
"quota_include_external_storage": false,
"share_folder": "/Shares",
"skeletondirectory": "",
"theme": "",
"trashbin_retention_obligation": "auto, 7",
"updater.release.channel": "beta",
"onlyoffice": {
"verify_peer_off": true
},
"mail_from_address": "REMOVED SENSITIVE VALUE",
"mail_smtpmode": "smtp",
"mail_smtpauthtype": "LOGIN",
"mail_domain": "REMOVED SENSITIVE VALUE",
"mail_smtpsecure": "ssl",
"mail_smtpauth": 1,
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"mail_smtpport": "465",
"mail_smtpname": "REMOVED SENSITIVE VALUE",
"mail_smtppassword": "REMOVED SENSITIVE VALUE",
"updater.secret": "REMOVED SENSITIVE VALUE"
}
}

App

`Enabled:

  • activity: 2.6.1
  • announcementcenter: 3.2.1
  • calendar: 1.6.1
  • comments: 1.3.0
  • contacts: 2.1.5
  • dav: 1.4.7
  • federatedfilesharing: 1.3.1
  • federation: 1.3.0
  • files: 1.8.0
  • files_pdfviewer: 1.2.1
  • files_rightclick: 0.8.4
  • files_sharing: 1.5.0
  • files_texteditor: 2.5.1
  • files_trashbin: 1.3.0
  • files_versions: 1.6.0
  • files_videoplayer: 1.2.0
  • firstrunwizard: 2.2.1
  • gallery: 18.0.0
  • groupfolders: 1.3.2
  • logreader: 2.0.0
  • lookup_server_connector: 1.1.0
  • nextcloud_announcements: 1.2.0
  • notifications: 2.1.2
  • oauth2: 1.1.1
  • onlyoffice: 1.3.0
  • password_policy: 1.3.0
  • provisioning_api: 1.3.0
  • quota_warning: 1.2.0
  • serverinfo: 1.3.0
  • sharebymail: 1.3.0
  • socialsharing_email: 1.0.3
  • spreed: 3.2.5
  • systemtags: 1.3.0
  • theming: 1.4.5
  • twofactor_backupcodes: 1.2.3
  • updatenotification: 1.3.0
  • workflowengine: 1.3.0
    Disabled:
  • admin_audit
  • encryption
  • files_external
  • survey_client
  • user_external
  • user_ldap`
@juliushaertl
Copy link
Member

Can you check the permissions of your data directory? Does the webserver has write access to /var/nc_data/updater-oct4dzqp3hji/backups/ ?

@quentinDupont
Copy link
Author

Yep !
drwxr-x--- 3 www-data www-data 4,0K août 9 20:16 backups

And it started to create folders and files :

root:backups# ls
nextcloud-13.0.5.2
root:backups# cd nextcloud-13.0.5.2/ && ls
3rdparty apps config console.php core index.html index.php ocs-provider robots.txt settings version.php

@kesselb
Copy link
Contributor

kesselb commented Aug 10, 2018

Could you check permissions and owner for /var/www/nextcloud/config/config.php.bak? I guess www-data does not have enough rights to read this file.

@quentinDupont
Copy link
Author

Ok for config.php.bak it's owned by root indeed :
-rw-r----- 1 www-data www-data 2556 août 10 16:42 config.php
-rw-r----- 1 root root 594 août 8 21:20 config.php.bak

@quentinDupont
Copy link
Author

Yes !
So I changed it :
sudo chown www-data:www-data config.php.bak
And try the updater that passes successfully the step 3 and every step !

Thank you !! <3

Too bad that these app (announcementcenter, onlyoffice, quota_warning, socialsharing_email, spreed) are not compatible.. yet !? 😄

@quentinDupont
Copy link
Author

So, was it normal to have these permissions ? or I made a mistake somehow ?

@juliushaertl
Copy link
Member

@quentinDupont The file is not supposed to be there. From the ending it might be a temporary copy of some editor that has not been removed.

Besides that this is not really a server issue. The updater cannot perform a backup if the files are not readable, so I'm closing this.

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