# Create backup failed when updating from 16.0.3 to 16.0.5 via Updater

**URL:** <https://help.nextcloud.com/t/create-backup-failed-when-updating-from-16-0-3-to-16-0-5-via-updater/61728>\
**Category:** ℹ️ Support\
**Tags:** update\_problems, nc16\
**Created:** [October 9, 2019, 5:24pm UTC](https://help.nextcloud.com/t/create-backup-failed-when-updating-from-16-0-3-to-16-0-5-via-updater/61728 "2019-10-09T17:24:52Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![master05](https://help.nextcloud.com/user_avatar/help.nextcloud.com/master05/32/44680_2.png) [@master05](https://help.nextcloud.com/u/master05)\
**Post date:** [October 9, 2019, 5:24pm UTC](https://help.nextcloud.com/t/create-backup-failed-when-updating-from-16-0-3-to-16-0-5-via-updater/61728/1 "2019-10-09T17:24:52Z")

</div>

Nextcloud version _16.03_:  
Operating system and version _unknown (webhosted)_:  
Apache or nginx version _unknown (webhosted)_:  
PHP version _7.3_:

The issue you are facing:  
When running the Updater for the first time it fails creating a backup with an internal server error. When trying to update at a later time the updater says that the backup has been created successfully. At first try to continue updating the system was left in an unfixable state and was unavailable. At the second try the backup could not be created as well but the update could be successfully done.

Is this the first time you’ve seen this error? _N_:  
As described before.

Steps to replicate it:

1. I set up a new nextcloud instance on a subdomain of my hosted webspace via web installer. It currently installs to 16.0.3
2. Trying to update via updater tool
3. Fail of backup create step

The output of your Nextcloud log in **Admin \> Logging** :

Admin logging only consists of ERRORS like this:

```auto
[PHP] Error: opendir(/var/tmp/): failed to open dir: Permission denied at /mnt/***/htdocs/tempcloud/lib/private/TempManager.php#190

GET /cron.php
from *** at 2019-10-09T17:01:58+00:00

```

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

```auto
<?php
$CONFIG = array (
  'instanceid' => ' ****',
  'passwordsalt' => ' ****',
  'secret' => ' ****',
  'trusted_domains' => 
  array (
    0 => ' ****',
  ),
  'datadirectory' => '/mnt/***/htdocs/tempcloud/data',
  'dbtype' => 'mysql',
  'version' => '16.0.3.0',
  'overwrite.cli.url' => ' ****',
  'dbname' => ' ****',
  'dbhost' => 'r ****',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => ' ****',
  'dbpassword' => ' ****',
  'installed' => true,
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
  'updater.secret' => ' ****',
);

```

The output of your Apache/nginx/system log in `/var/log/ ____ `:  
Not available. Hosted webspace.

---

<div class="post-metadata">

**Author:** ![eehmke](https://help.nextcloud.com/user_avatar/help.nextcloud.com/eehmke/32/8934_2.png) [@eehmke](https://help.nextcloud.com/u/eehmke)\
**Post date:** [October 11, 2019, 12:47pm UTC](https://help.nextcloud.com/t/create-backup-failed-when-updating-from-16-0-3-to-16-0-5-via-updater/61728/2 "2019-10-11T12:47:33Z")

</div>

So what are the permissions at  
`/mnt/***/htdocs/tempcloud/`  
? The user running the nextcloud instance needs write access there.

---

<div class="post-metadata">

**Author:** ![master05](https://help.nextcloud.com/user_avatar/help.nextcloud.com/master05/32/44680_2.png) [@master05](https://help.nextcloud.com/u/master05)\
**Post date:** [October 11, 2019, 7:53pm UTC](https://help.nextcloud.com/t/create-backup-failed-when-updating-from-16-0-3-to-16-0-5-via-updater/61728/3 "2019-10-11T19:53:43Z")

</div>

When logging in into my webspace vis ssh and running `ls -l` it shows that the owner has _rwx_ and is _customer_. However I‘m not sure if this is the user running the instance. Would guess it is though.  
If the user has no write permission it hadn‘t been possible to install a new instance in the first place. Or am I wrong?

---

<div class="post-metadata">

**Author:** ![eehmke](https://help.nextcloud.com/user_avatar/help.nextcloud.com/eehmke/32/8934_2.png) [@eehmke](https://help.nextcloud.com/u/eehmke)\
**Post date:** [October 11, 2019, 9:33pm UTC](https://help.nextcloud.com/t/create-backup-failed-when-updating-from-16-0-3-to-16-0-5-via-updater/61728/4 "2019-10-11T21:33:33Z")

</div>

That’s right, but you need write access to the data directory too. What is the result of  
`ls -l /mnt/***/htdocs/tempcloud/`  
? Is it owned by customer too? Has it rwx too? Is customer your login name?

---

<div class="post-metadata">

**Author:** ![master05](https://help.nextcloud.com/user_avatar/help.nextcloud.com/master05/32/44680_2.png) [@master05](https://help.nextcloud.com/u/master05)\
**Post date:** [October 12, 2019, 8:45am UTC](https://help.nextcloud.com/t/create-backup-failed-when-updating-from-16-0-3-to-16-0-5-via-updater/61728/5 "2019-10-12T08:45:50Z")

</div>

Output for data dir is as follows:  
`drwxr-x--- 7 4290626 customer 4096 Oct 9 18:43 data`

rw is set for each item (dir and file) in dir tempcloud. Owner is also customer.  
customer is not my login name. My login name is the domain name.

---

<div class="post-metadata">

**Author:** ![master05](https://help.nextcloud.com/user_avatar/help.nextcloud.com/master05/32/44680_2.png) [@master05](https://help.nextcloud.com/u/master05)\
**Post date:** [October 13, 2019, 4:07pm UTC](https://help.nextcloud.com/t/create-backup-failed-when-updating-from-16-0-3-to-16-0-5-via-updater/61728/6 "2019-10-13T16:07:43Z")

</div>

Tried again with a new instance and this is the error message I get in the updater:

```auto
Parsing response failed. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body> <h1>Internal Server Error</h1> <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>Please contact the server administrator at service@webmailer.de to inform them of the time this error occurred, and the actions you performed just before this error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

```

And this _updater.log_-content:

```auto
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] request to updater
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] currentStep()
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] show HTML page
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] current version: 16.0.3 build time: 2019-07-09T12:01:37+00:00 185087e9bc46c1ef08e165e1ac979827dc05d469
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] getUpdateServerResponse()
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] updaterServer: https://updates.nextcloud.com/updater_server/
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] releaseChannel: stable
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] internal version: 16.0.3.0
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] updateURL: https://updates.nextcloud.com/updater_server/?version=16x0x3x0xxxstablexx2019-07-09T12%3A01%3A37%2B00%3A00+185087e9bc46c1ef08e165e1ac979827dc05d469x7x3x9
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] getUpdateServerResponse response: Array
(
    [version] => 16.0.5.1
    [versionstring] => Nextcloud 16.0.5
    [url] => https://download.nextcloud.com/server/releases/nextcloud-16.0.5.zip
    [web] => https://docs.nextcloud.com/server/16/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=16.0.5
    [autoupdater] => 1
    [eol] => 0
    [signature] => iAsxJoaWRQ/1A0M3PuiDehji4x0Ci158wpa5IAv+oZbuWdhOqZjcZbLf/2cWWeCL
ggZX8WJpdJw8ZDKNtInVpfcbI558mu0L9axjl7Cpl9T8lvF9uXOa26tgeuVV5Zh0
TKlB2rdZESjvMgCNgK7WgsYqCwspvnUsRRthssuSHA0mLCJuFDr73FiDi4fQPBlr
UuRojwQ1uHlNgct/cBElCwqCWkX4mx4CRC0jQh7jV/rdF4Cy0+ajWXMOBJgkyDkG
CLEAXZOCRmDQGFJT30TACL+cVYTrhMHGsha8I4v5/LOQhYQRaDLVqHPbrvJ2ge1N
ZGWQu68eon7Vfr0iKKPJ3A==
)

2019-10-13T17:58:04+0200 nKvEmeNW6g [info] checkForUpdate() Array
(
    [version] => 16.0.5.1
    [versionstring] => Nextcloud 16.0.5
    [url] => https://download.nextcloud.com/server/releases/nextcloud-16.0.5.zip
    [web] => https://docs.nextcloud.com/server/16/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=16.0.5
    [autoupdater] => 1
    [eol] => 0
    [signature] => iAsxJoaWRQ/1A0M3PuiDehji4x0Ci158wpa5IAv+oZbuWdhOqZjcZbLf/2cWWeCL
ggZX8WJpdJw8ZDKNtInVpfcbI558mu0L9axjl7Cpl9T8lvF9uXOa26tgeuVV5Zh0
TKlB2rdZESjvMgCNgK7WgsYqCwspvnUsRRthssuSHA0mLCJuFDr73FiDi4fQPBlr
UuRojwQ1uHlNgct/cBElCwqCWkX4mx4CRC0jQh7jV/rdF4Cy0+ajWXMOBJgkyDkG
CLEAXZOCRmDQGFJT30TACL+cVYTrhMHGsha8I4v5/LOQhYQRaDLVqHPbrvJ2ge1N
ZGWQu68eon7Vfr0iKKPJ3A==
)

2019-10-13T17:58:04+0200 nKvEmeNW6g [info] getChangelogURL()
2019-10-13T17:58:04+0200 nKvEmeNW6g [info] end of checkForUpdate() Update to Nextcloud 16.0.5 available. (channel: "stable")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">https://download.nextcloud.com/server/releases/nextcloud-16.0.5.zip</code><br /><a class="external_link" href="https://nextcloud.com/changelog/#16-0-5" target="_blank" rel="noreferrer noopener">Open changelog ↗</a>
2019-10-13T17:58:41+0200 DCouSSgzjm [info] request to updater
2019-10-13T17:58:41+0200 DCouSSgzjm [info] currentStep()
2019-10-13T17:58:41+0200 DCouSSgzjm [info] POST request for step "1"
2019-10-13T17:58:41+0200 DCouSSgzjm [info] startStep("1")
2019-10-13T17:58:41+0200 DCouSSgzjm [info] checkForExpectedFilesAndFolders()
2019-10-13T17:58:41+0200 DCouSSgzjm [info] end of checkForExpectedFilesAndFolders()
2019-10-13T17:58:41+0200 DCouSSgzjm [info] endStep("1")
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] request to updater
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] currentStep()
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] Step 1 is in state "end".
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] POST request for step "2"
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] startStep("2")
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] checkWritePermissions()
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] end of checkWritePermissions()
2019-10-13T17:58:41+0200 QIQgu4yeaN [info] endStep("2")
2019-10-13T17:58:42+0200 VrJ8HGillf [info] request to updater
2019-10-13T17:58:42+0200 VrJ8HGillf [info] currentStep()
2019-10-13T17:58:42+0200 VrJ8HGillf [info] Step 2 is in state "end".
2019-10-13T17:58:42+0200 VrJ8HGillf [info] POST request for step "3"
2019-10-13T17:58:42+0200 VrJ8HGillf [info] startStep("3")
2019-10-13T17:58:42+0200 VrJ8HGillf [info] createBackup()
2019-10-13T18:01:58+0200 VrJ8HGillf [info] end of createBackup()
2019-10-13T18:01:58+0200 VrJ8HGillf [info] endStep("3")

```

Unfortunately it doesn´t tell anything about errors. However it seems that write permissions are granted because it doesn´t abort after checkWritePermissions().

---

<div class="post-metadata">

**Author:** ![master05](https://help.nextcloud.com/user_avatar/help.nextcloud.com/master05/32/44680_2.png) [@master05](https://help.nextcloud.com/u/master05)\
**Post date:** [November 9, 2019, 2:58pm UTC](https://help.nextcloud.com/t/create-backup-failed-when-updating-from-16-0-3-to-16-0-5-via-updater/61728/7 "2019-11-09T14:58:18Z")

</div>

Tried again with original instance. Now the updater wanted to update to 16.0.6.

Error message while creating backup:

```
Parsing response failed. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body> <h1>Internal Server Error</h1> <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>Please contact the server administrator at service@webmailer.de to inform them of the time this error occurred, and the actions you performed just before this error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

```

Is it possible to update server version by creating a new instance with the web installer and setting the config file?

---

<div class="post-metadata">

**Author:** ![master05](https://help.nextcloud.com/user_avatar/help.nextcloud.com/master05/32/44680_2.png) [@master05](https://help.nextcloud.com/u/master05)\
**Post date:** [November 10, 2019, 2:57pm UTC](https://help.nextcloud.com/t/create-backup-failed-when-updating-from-16-0-3-to-16-0-5-via-updater/61728/8 "2019-11-10T14:57:14Z")

</div>

Found the error in the server log files. The problem is that the php max\_execution\_time is set to 120s. Backup needs longer than that and therefore the script is terminated.  
Unfortunately in my shared hosting environment it is not possible to change that setting.

---

<div class="post-metadata">

**Author:** ![ruppscloudadmin](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ruppscloudadmin/32/8033_2.png) [@ruppscloudadmin](https://help.nextcloud.com/u/ruppscloudadmin)\
**Post date:** [November 11, 2019, 5:39pm UTC](https://help.nextcloud.com/t/create-backup-failed-when-updating-from-16-0-3-to-16-0-5-via-updater/61728/9 "2019-11-11T17:39:02Z")

</div>

> [@master05](#):
>
> max\_execution\_time

Same problem here including the

> **Parsing response failed.**
>
> `<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body> <h1>Internal Server Error</h1> <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>Please contact the server administrator at service@webmailer.de to inform them of the time this error occurred, and the actions you performed just before this error.</p> <p>More information about this error may be available in the server error log.</p> </body></html> `

Just last week I switched from PHP 7.2 to PHP 7.3 (_because of the passwords app complaints_), and I see my `max_execution_time` is set to 30.

I raised the value, but right now I’m stuck with that

> Step 3 is currently in process. Please reload this page later.

message if I try to run the web updater again. I forget how to fix that, but I’ll look around at old posts and see if it’s already on the forum.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 4, 2024, 10:35am UTC](https://help.nextcloud.com/t/create-backup-failed-when-updating-from-16-0-3-to-16-0-5-via-updater/61728/11 "2024-12-04T10:35:42Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 3:45pm UTC](https://help.nextcloud.com/t/create-backup-failed-when-updating-from-16-0-3-to-16-0-5-via-updater/61728/12 "2024-12-11T15:45:06Z")

</div>


