# \[Solved\] 12.0.2 to 12.0.3 Update Failes at "Create Backup"

**URL:** <https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490>\
**Category:** ℹ️ Support\
**Tags:** permission\_setting\
**Created:** [September 25, 2017, 4:32pm UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490 "2017-09-25T16:32:05Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Craash](https://help.nextcloud.com/letter_avatar/craash/32/5_5575768a8748004e209b776fc1b2916d.png) [@Craash](https://help.nextcloud.com/u/Craash)\
**Post date:** [September 25, 2017, 4:32pm UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/1 "2017-09-25T16:32:06Z")

</div>

While trying to update my nextcloud install from 12.02 to 12.03, the web updater displays the following:

Initializing  
Current version is 12.0.2.  
Update to Nextcloud 12.0.3 available. (channel: “stable”)  
Following file will be downloaded automatically: [https://download.nextcloud.com/server/releases/nextcloud-12.0.3.zip](https://download.nextcloud.com/server/releases/nextcloud-12.0.3.zip)  
Retry update  
Check for expected files  
Check for write permissions  
Enable maintenance mode  
Create backup  
Could not copy “/var/www/nextcloud/config/config.old” to “/var/www/nextcloud-data//updater-oc7ocyzpooo6/backups/nextcloud-12.0.2.0/config/config.old”

The TWO // in the error line is not a type. That is what the error message says.

My server is Ubuntu 16.04 LTS SERVER running in an ESXi 6.5 VM.

I’ve set maintenance mode back to false in the config.php, updated the OS, rebooted, and I still get the error. This was initially a 10.x install that has been updated multiple times, without a single error.

---

<div class="post-metadata">

**Author:** ![radel](https://help.nextcloud.com/letter_avatar/radel/32/5_5575768a8748004e209b776fc1b2916d.png) [@radel](https://help.nextcloud.com/u/radel)\
**Post date:** [September 26, 2017, 8:56am UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/2 "2017-09-26T08:56:37Z")

</div>

Hi,

AFAIK datadirectory in the config file should not have a trailing slash.

Perhaps you have in the config file something like

**‘datadirectory’ =\> ‘/var/www/nextcloud-data/’,**

If so I would remove the last “/”.

Radel

---

<div class="post-metadata">

**Author:** ![Craash](https://help.nextcloud.com/letter_avatar/craash/32/5_5575768a8748004e209b776fc1b2916d.png) [@Craash](https://help.nextcloud.com/u/Craash)\
**Post date:** [September 26, 2017, 11:46am UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/3 "2017-09-26T11:46:06Z")

</div>

Nice catch, but I"m sad to say after making that change the error message doesn’t have the double //, but it still fails.  
Create backup  
Could not copy “/var/www/nextcloud/config/config.old” to “/var/www/nextcloud-data/updater-oc7ocyzpooo6/backups/nextcloud-12.0.2.0/config/config.old”

Any ideas?

---

<div class="post-metadata">

**Author:** ![Craash](https://help.nextcloud.com/letter_avatar/craash/32/5_5575768a8748004e209b776fc1b2916d.png) [@Craash](https://help.nextcloud.com/u/Craash)\
**Post date:** [September 26, 2017, 11:51am UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/4 "2017-09-26T11:51:06Z")

</div>

To ensure it wasn’t a weird permission issue, I reset perms on the nextclould-data folder with:

sudo chown www-data:www-data /var/www/nextcloud-data -R

No change, still errors out.

---

<div class="post-metadata">

**Author:** ![JimmyKater](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jimmykater/32/4850_2.png) [@JimmyKater](https://help.nextcloud.com/u/JimmyKater)\
**Post date:** [September 26, 2017, 11:52am UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/5 "2017-09-26T11:52:58Z")

</div>

> [@Craash](#):
>
> /var/www/nextcloud-data/updater-oc7ocyzpooo6/backups/nextcloud-12.0.2.0/config/config.old

does that path exist? especially `.../nextcloud-data/...` looks strange to me. maybe it should be `.../nextcloud/data...` instead?

---

<div class="post-metadata">

**Author:** ![radel](https://help.nextcloud.com/letter_avatar/radel/32/5_5575768a8748004e209b776fc1b2916d.png) [@radel](https://help.nextcloud.com/u/radel)\
**Post date:** [September 26, 2017, 12:32pm UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/6 "2017-09-26T12:32:12Z")

</div>

Just to be sure… Is the data-directory ( in your case /var/www/netxcloud-data ) writeable?  
This means you need at least a rwx------ permission. I use 750 (rwxr-x—)

So I would go with:  
**chmod u+rwx /var/www/nextcloud-data**

Perhaps there is something useful in the nextcloud.log file: can you find share some parts of it?

Next move could be:  
**mkdir -p /var/www/nextcloud-data/updater-oc7ocyzpooo6/backups/nextcloud-12.0.2.0/config/**  
**chown -R www-data:www-data /var/www/nextcloud-data/updater-oc7ocyzpooo6**

---

<div class="post-metadata">

**Author:** ![Craash](https://help.nextcloud.com/letter_avatar/craash/32/5_5575768a8748004e209b776fc1b2916d.png) [@Craash](https://help.nextcloud.com/u/Craash)\
**Post date:** [September 26, 2017, 12:42pm UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/7 "2017-09-26T12:42:52Z")

</div>

The directory exists, and is writeable. I made no changes.

root@vm-Nextcloud:/var/www/nextcloud-data/updater-oc7ocyzpooo6/backups/nextcloud-12.0.2.0# ls -l  
total 136  
drwxr-x— 37 www-data www-data 4096 Sep 26 06:49 apps  
-rw-r–r-- 1 www-data www-data 8868 Sep 26 06:49 AUTHORS  
drwxr-x— 2 www-data www-data 4096 Sep 26 06:49 config  
-rw-r–r-- 1 www-data www-data 4050 Sep 26 06:49 console.php  
drwxr-x— 16 www-data www-data 4096 Sep 26 06:49 core  
-rw-r–r-- 1 www-data www-data 5057 Sep 26 06:49 cron.php  
-rw-r–r-- 1 www-data www-data 41077 Sep 26 06:49 db\_structure.xml  
-rw-r–r-- 1 www-data www-data 179 Sep 26 06:49 index.html  
-rw-r–r-- 1 www-data www-data 2804 Sep 26 06:49 index.php  
drwxr-x— 3 www-data www-data 4096 Sep 26 06:49 l10n  
drwxr-x— 6 www-data www-data 4096 Sep 26 06:49 lib  
drwxr-x— 2 www-data www-data 4096 Sep 26 06:49 ocs  
drwxr-x— 2 www-data www-data 4096 Sep 26 06:49 ocs-provider  
-rw-r–r-- 1 www-data www-data 5323 Sep 26 06:49 remote.php  
drwxr-x— 4 www-data www-data 4096 Sep 26 06:49 resources  
drwxr-x— 14 www-data www-data 4096 Sep 26 06:49 settings  
-rw-r–r-- 1 www-data www-data 2110 Sep 26 06:49 status.php  
drwxr-x— 3 www-data www-data 4096 Sep 26 06:49 themes  
drwxr-x— 2 www-data www-data 4096 Sep 26 06:49 updater  
-rw-r–r-- 1 www-data www-data 435 Sep 26 06:49 version.php

---

<div class="post-metadata">

**Author:** ![Craash](https://help.nextcloud.com/letter_avatar/craash/32/5_5575768a8748004e209b776fc1b2916d.png) [@Craash](https://help.nextcloud.com/u/Craash)\
**Post date:** [September 26, 2017, 12:43pm UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/8 "2017-09-26T12:43:52Z")

</div>

/var/www/nextcloud-data/updater-oc7ocyzpooo6/backups/nextcloud-12.0.2.0 is also empty.

---

<div class="post-metadata">

**Author:** ![radel](https://help.nextcloud.com/letter_avatar/radel/32/5_5575768a8748004e209b776fc1b2916d.png) [@radel](https://help.nextcloud.com/u/radel)\
**Post date:** [September 26, 2017, 12:57pm UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/9 "2017-09-26T12:57:31Z")

</div>

I don’t understand… if /var/www/nextcloud-data/updater-oc7ocyzpooo6/backups/nextcloud-12.0.2.0 is empty, where the listing above came from?

Moreover I think there is a bit of confusion between the installation directory and the data directory.

Can you list the content of the installation directory, with special attention to the config directory? I suppose you have a config.old file not readable by www-data.

---

<div class="post-metadata">

**Author:** ![Craash](https://help.nextcloud.com/letter_avatar/craash/32/5_5575768a8748004e209b776fc1b2916d.png) [@Craash](https://help.nextcloud.com/u/Craash)\
**Post date:** [September 26, 2017, 1:11pm UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/10 "2017-09-26T13:11:25Z")

</div>

Sorry, I should have included /config on the path when I stated it was empty.

To clarify:

/var/www/nextcloud-data/updater-oc7ocyzpooo6/backups/nextcloud-12.0.2.0/config  
1. Exists  
2. Is Empty  
3. Perms: drwxr-x— 2 www-data www-data

root@vm-Nextcloud:/var/www/nextcloud-data/updater-oc7ocyzpooo6/backups/nextcloud-12.0.2.0# ls -l  
total 136  
drwxr-x— 37 www-data www-data 4096 Sep 26 06:49 apps  
-rw-r–r-- 1 www-data www-data 8868 Sep 26 06:49 AUTHORS  
drwxr-x— 2 www-data www-data 4096 Sep 26 06:49 config  
-rw-r–r-- 1 www-data www-data 4050 Sep 26 06:49 console.php  
drwxr-x— 16 www-data www-data 4096 Sep 26 06:49 core  
-rw-r–r-- 1 www-data www-data 5057 Sep 26 06:49 cron.php  
-rw-r–r-- 1 www-data www-data 41077 Sep 26 06:49 db\_structure.xml  
-rw-r–r-- 1 www-data www-data 179 Sep 26 06:49 index.html  
-rw-r–r-- 1 www-data www-data 2804 Sep 26 06:49 index.php  
drwxr-x— 3 www-data www-data 4096 Sep 26 06:49 l10n  
drwxr-x— 6 www-data www-data 4096 Sep 26 06:49 lib  
drwxr-x— 2 www-data www-data 4096 Sep 26 06:49 ocs  
drwxr-x— 2 www-data www-data 4096 Sep 26 06:49 ocs-provider  
-rw-r–r-- 1 www-data www-data 5323 Sep 26 06:49 remote.php  
drwxr-x— 4 www-data www-data 4096 Sep 26 06:49 resources  
drwxr-x— 14 www-data www-data 4096 Sep 26 06:49 settings  
-rw-r–r-- 1 www-data www-data 2110 Sep 26 06:49 status.php  
drwxr-x— 3 www-data www-data 4096 Sep 26 06:49 themes  
drwxr-x— 2 www-data www-data 4096 Sep 26 06:49 updater  
-rw-r–r-- 1 www-data www-data 435 Sep 26 06:49 version.php

root@vm-Nextcloud:/var/www/nextcloud-data/updater-oc7ocyzpooo6/backups/nextcloud-12.0.2.0# cd config  
root@vm-Nextcloud:/var/www/nextcloud-data/updater-oc7ocyzpooo6/backups/nextcloud-12.0.2.0/config# ls -l  
total 0  
root@vm-Nextcloud:/var/www/nextcloud-data/updater-oc7ocyzpooo6/backups/nextcloud-12.0.2.0/config#

---

<div class="post-metadata">

**Author:** ![Craash](https://help.nextcloud.com/letter_avatar/craash/32/5_5575768a8748004e209b776fc1b2916d.png) [@Craash](https://help.nextcloud.com/u/Craash)\
**Post date:** [September 26, 2017, 1:15pm UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/11 "2017-09-26T13:15:11Z")

</div>

Config directory:

root@vm-Nextcloud:/var/www/nextcloud/config# ls -l  
total 56  
-rw-r----- 1 root root 1124 Sep 11 11:12 config.old  
-rw-r----- 1 www-data www-data 1213 Sep 26 06:49 config.php  
-rw-r–r-- 1 www-data www-data 47329 Aug 23 15:14 config.sample.php  
root@vm-Nextcloud:/var/www/nextcloud/config#

Removing the config.old fixed it. Very nice catch.

---

<div class="post-metadata">

**Author:** ![radel](https://help.nextcloud.com/letter_avatar/radel/32/5_5575768a8748004e209b776fc1b2916d.png) [@radel](https://help.nextcloud.com/u/radel)\
**Post date:** [September 26, 2017, 1:16pm UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/12 "2017-09-26T13:16:02Z")

</div>

Good to know!

Radel

---

<div class="post-metadata">

**Author:** ![Craash](https://help.nextcloud.com/letter_avatar/craash/32/5_5575768a8748004e209b776fc1b2916d.png) [@Craash](https://help.nextcloud.com/u/Craash)\
**Post date:** [September 26, 2017, 1:16pm UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/13 "2017-09-26T13:16:04Z")

</div>

Update is successfully applied. Thank you, @radel

---

<div class="post-metadata">

**Author:** ![Craash](https://help.nextcloud.com/letter_avatar/craash/32/5_5575768a8748004e209b776fc1b2916d.png) [@Craash](https://help.nextcloud.com/u/Craash)\
**Post date:** [September 26, 2017, 1:20pm UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/14 "2017-09-26T13:20:25Z")

</div>

I’m glad we determined the exact problem, but had I ran:

sudo chown www-data:www-data /var/www/nextcloud -R

when I ran sudo chown www-data:www-data /var/www/nextcloud-data -R (Post #4), it would have fixed it to.

A perfect example of the need to be careful with file permissions.

---

<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 2, 2024, 2:36pm UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/15 "2024-12-02T14:36: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 4, 2024, 1:56pm UTC](https://help.nextcloud.com/t/solved-12-0-2-to-12-0-3-update-failes-at-create-backup/21490/16 "2024-12-04T13:56:04Z")

</div>


