Update 16.0.1 : can't create backup

I’m updated to Nextcloud 16.0.0 without any issue, but now that I’m trying to update to 16.0.1, I have an error at step 3 : Create backup.
Here is the updater.log :

2019-05-16T22:09:51+0000 XFzSm7IoZw [info] request to updater
2019-05-16T22:09:51+0000 XFzSm7IoZw [info] currentStep()
2019-05-16T22:09:51+0000 XFzSm7IoZw [info] POST request for step “1”
2019-05-16T22:09:51+0000 XFzSm7IoZw [info] startStep(“1”)
2019-05-16T22:09:51+0000 XFzSm7IoZw [info] checkForExpectedFilesAndFolders()
2019-05-16T22:09:51+0000 XFzSm7IoZw [info] end of checkForExpectedFilesAndFolders()
2019-05-16T22:09:51+0000 XFzSm7IoZw [info] endStep(“1”)
2019-05-16T22:09:51+0000 F1YklI2s9a [info] request to updater
2019-05-16T22:09:51+0000 F1YklI2s9a [info] currentStep()
2019-05-16T22:09:51+0000 F1YklI2s9a [info] Step 1 is in state “end”.
2019-05-16T22:09:51+0000 F1YklI2s9a [info] POST request for step “2”
2019-05-16T22:09:51+0000 F1YklI2s9a [info] startStep(“2”)
2019-05-16T22:09:51+0000 F1YklI2s9a [info] checkWritePermissions()
2019-05-16T22:09:51+0000 F1YklI2s9a [info] end of checkWritePermissions()
2019-05-16T22:09:51+0000 F1YklI2s9a [info] endStep(“2”)
2019-05-16T22:09:52+0000 eragr3xQR4 [info] request to updater
2019-05-16T22:09:52+0000 eragr3xQR4 [info] currentStep()
2019-05-16T22:09:52+0000 eragr3xQR4 [info] Step 2 is in state “end”.
2019-05-16T22:09:52+0000 eragr3xQR4 [info] POST request for step “3”
2019-05-16T22:09:52+0000 eragr3xQR4 [info] startStep(“3”)
2019-05-16T22:09:52+0000 eragr3xQR4 [info] createBackup()
2019-05-16T22:09:52+0000 eragr3xQR4 [error] POST request failed with other exception
2019-05-16T22:09:52+0000 eragr3xQR4 [error] Exception: Exception
Message: Could not create backup folder location
#0 /config/www/nextcloud/updater/index.php(1333): Updater->createBackup()
#1 {main}
2019-05-16T22:09:52+0000 eragr3xQR4 [info] rollbackChanges(“3”)
2019-05-16T22:09:52+0000 eragr3xQR4 [info] unlink .step
2019-05-16T22:09:52+0000 eragr3xQR4 [info] end of rollbackChanges()

Can you help me please ?

It seems that the error is coming from those lines :

  // Create new folder for the backup
	$backupFolderLocation = $this->getDataDirectoryLocation() . '/updater-'.$this->getConfigOption('instanceid').'/backups/nextcloud-'.$this->getConfigOption('version') . '/';
	if(file_exists($backupFolderLocation)) {
		$this->silentLog('[info] backup folder location exists');
	$state = mkdir($backupFolderLocation, 0750, true);
	if($state === false) {
		throw new \Exception('Could not create backup folder location');

Does it means that it’s a permission error ?

I have/had the same issue. My hoster uses SELinux and in this case creating the backup results in the same error due to wrong SELinux labels in the file system. This can be fixed in the console by executing the command restorecon -R <nextcloud-folder> and re-running the backup.

The same happens again when the Nextcloud upgrade is finished. Before running php ./occ ugprade or using the web-interface for upgrade one has to run the restorecon command again.

Maybe this applies to your case as well?