Server: Upgrade Nextcloud 14 : Copy error step 3 backup

Created on 9 Aug 2018  路  7Comments  路  Source: nextcloud/server

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`
bug install and update

Most helpful comment

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 !? :smile:

All 7 comments

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

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

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.

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

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 !? :smile:

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

@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.

Was this page helpful?
0 / 5 - 0 ratings