# Nextcloud upgrade to 34.0.2 failed and removed 34.0.1

**URL:** https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674
**Category:** Support apps
**Tags:** nextcloud, french
**Created:** [July 24, 2026, 7:08am UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674 "2026-07-24T07:08:46Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Cys](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@Cys](https://forum.yunohost.org/u/Cys)
#### Post date: [July 24, 2026, 7:08am UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/1 "2026-07-24T07:08:47Z")

</div>

**What app is this about, and its version** : Nextcloud 34.0.2-ynh1  
**What YunoHost version are you running** : 12.1.40.1  
**What type of hardware are you using** : VPS bought online

### Describe your issue

Hi all,  
I tried to update Nextcloud to the lastest version 34.0.2 from 34.0.1 and the upgrade failed. But the main issue is that the existing version is no more running and I can’t restore the backup file (error 500 in both cases).  
Thanks a lot for your help !

### Share relevant logs or error messages

I can’t use paste.yunohost yet so here is only an extract of the restore logs (because I really need to get an operationnal Nextcloud)

ended\_at: 2026-07-24 06:22:19.165796  
env:  
BASH\_XTRACEFD: ‘7’  
YNH\_APP\_ACTION: restore  
YNH\_APP\_BACKUP\_DIR: /home/yunohost.backup/tmp/nextcloud-pre-upgrade2/apps/nextcloud/backup  
YNH\_APP\_BASEDIR: /home/yunohost.backup/tmp/nextcloud-pre-upgrade2/apps/nextcloud/settings  
YNH\_APP\_ID: nextcloud  
YNH\_APP\_INSTANCE\_NAME: nextcloud  
YNH\_APP\_INSTANCE\_NUMBER: ‘1’  
YNH\_APP\_MANIFEST\_VERSION: 34.0.1~ynh1  
YNH\_APP\_PACKAGING\_FORMAT: ‘2.0’  
YNH\_ARCH: amd64  
YNH\_BACKUP\_CSV: /home/yunohost.backup/tmp/nextcloud-pre-upgrade2/backup.csv  
YNH\_BACKUP\_DIR: /home/yunohost.backup/tmp/nextcloud-pre-upgrade2  
YNH\_CWD: /home/yunohost.backup/tmp/nextcloud-pre-upgrade2/apps/nextcloud/backup  
YNH\_DEBIAN\_VERSION: bookworm  
YNH\_DEFAULT\_PHP\_VERSION: ‘8.2’  
YNH\_HELPERS\_VERSION: ‘2.1’  
YNH\_INTERFACE: api  
YNH\_STDRETURN: /tmp/tmp8hd\_1yat/stdreturn  
error: An error occured inside the app restore script  
interface: api  
operation: backup\_restore\_app  
parent: null  
related\_to:

- 
  - app
  - nextcloud  
started\_at: 2026-07-24 06:21:25.483195  
started\_by: \*\*\*\*\*\*  
success: false  
yunohost\_version: 12.1.40.1

============

2026-07-24 06:21:26,528: INFO - Restoring nextcloud…  
2026-07-24 06:21:26,552: DEBUG - Loading migration 0032\_firewall\_config…  
2026-07-24 06:21:26,552: DEBUG - Loading migration 0031\_terms\_of\_services…  
2026-07-24 06:21:26,552: DEBUG - Loading migration 0028\_delete\_legacy\_xmpp\_permission…  
2026-07-24 06:21:26,553: DEBUG - Loading migration 0033\_rework\_permission\_infos…  
2026-07-24 06:21:26,553: DEBUG - Loading migration 0030\_rebuild\_python\_venv\_in\_bookworm…  
2026-07-24 06:21:26,553: DEBUG - Loading migration 0027\_migrate\_to\_bookworm…  
2026-07-24 06:21:26,553: DEBUG - Loading migration 0034\_fix\_missing\_admins\_aliases…  
2026-07-24 06:21:26,553: DEBUG - Loading migration 0035\_fix\_apps\_nodejs\_version…  
2026-07-24 06:21:26,554: DEBUG - Loading migration 0029\_postgresql\_13\_to\_15…  
2026-07-24 06:21:26,673: DEBUG - Restoring the app ‘nextcloud’…  
2026-07-24 06:21:26,763: INFO - Provisioning sources…  
2026-07-24 06:21:26,764: INFO - Provisioning system\_user…  
2026-07-24 06:21:27,730: INFO - Provisioning install\_dir…  
2026-07-24 06:21:27,762: INFO - Provisioning data\_dir…  
2026-07-24 06:21:27,784: INFO - Provisioning permissions…  
2026-07-24 06:21:27,798: DEBUG - Permission ‘nextcloud.main’ updated  
2026-07-24 06:21:27,805: DEBUG - Permission ‘nextcloud.main’ updated  
2026-07-24 06:21:27,825: DEBUG - Permission ‘nextcloud.api’ updated  
2026-07-24 06:21:27,847: DEBUG - Permission ‘nextcloud.api’ updated  
2026-07-24 06:21:27,929: DEBUG - Creating LDAP perm nextcloud.api  
2026-07-24 06:21:27,935: DEBUG - Creating LDAP perm nextcloud.main  
2026-07-24 06:21:27,961: DEBUG - Permissions were resynchronized to LDAP  
2026-07-24 06:21:28,022: DEBUG - Formating result in ‘export’ mode  
2026-07-24 06:21:28,027: DEBUG - SSO and portal configurations regenerated  
2026-07-24 06:21:28,027: INFO - Provisioning ports…  
2026-07-24 06:21:28,038: INFO - Provisioning apt…  
2026-07-24 06:21:28,058: DEBUG - Executing command ‘[‘sh’, ‘-c’, ‘/bin/bash -x “./provision\_or\_update\_apt” 7\>&1’]’  
(…)  
2026-07-24 06:22:14,116: DEBUG - + default\_character\_set=()  
2026-07-24 06:22:14,117: DEBUG - + [[-n nextcloud]]  
2026-07-24 06:22:14,117: DEBUG - + default\_character\_set=(–default-character-set “$(mysql -B “$database” \<\<\< ‘show variables like “character\_set\_database”;’ | tail -n1 | cut -f2)”)  
2026-07-24 06:22:14,118: DEBUG - ++ cut -f2  
2026-07-24 06:22:14,118: DEBUG - ++ mysql -B nextcloud  
2026-07-24 06:22:14,119: DEBUG - ++ tail -n1  
2026-07-24 06:22:14,131: DEBUG - + mysql --default-character-set utf8mb4 -B nextcloud  
2026-07-24 06:22:18,539: WARNING - --------------  
2026-07-24 06:22:18,540: WARNING - INSERT INTO `oc_reactions` VALUES  
2026-07-24 06:22:18,542: WARNING - (1,150,151,‘guests’,‘sample’,‘?’),  
2026-07-24 06:22:18,543: WARNING - (2,150,152,‘guests’,‘sample’,‘?’),  
2026-07-24 06:22:18,543: WARNING - (3,219,220,‘guests’,‘sample’,‘?’),  
2026-07-24 06:22:18,546: WARNING - (4,219,221,‘guests’,‘sample’,‘?’),  
2026-07-24 06:22:18,548: DEBUG - + ynh\_exit\_properly  
2026-07-24 06:22:18,548: WARNING - (5,289,290,‘guests’,‘sample’,‘?’),  
2026-07-24 06:22:18,550: WARNING - (6,289,291,‘guests’,‘sample’,‘?’),  
2026-07-24 06:22:18,551: DEBUG - + [[restore =~ ^install$|^upgrade$|^restore$]]  
2026-07-24 06:22:18,551: WARNING - (7,308,309,‘guests’,‘sample’,‘?’),  
2026-07-24 06:22:18,552: WARNING - (8,308,310,‘guests’,‘sample’,‘?’),  
2026-07-24 06:22:18,553: WARNING - (9,323,324,‘guests’,‘sample’,‘?’),  
2026-07-24 06:22:18,554: WARNING - (10,323,325,‘guests’,‘sample’,‘?’)  
2026-07-24 06:22:18,556: WARNING - --------------  
2026-07-24 06:22:18,557: DEBUG -  
2026-07-24 06:22:18,558: WARNING - ERROR 1180 (HY000) at line 189461: Got error 1 “Operation not permitted” during COMMIT  
2026-07-24 06:22:19,164: ERROR - Could not restore nextcloud: An error occured inside the app restore script

---

<div class="post-metadata">

### Author: ![rodinux](https://forum.yunohost.org/user_avatar/forum.yunohost.org/rodinux/32/7029_2.png) [@rodinux](https://forum.yunohost.org/u/rodinux)
#### Post date: [July 24, 2026, 5:09pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/2 "2026-07-24T17:09:04Z")

</div>

> [@Cys](#):
>
> mysql --default-character-set utf8mb4 -B nextcloud  
> 2026-07-24 06:22:18,539: WARNING - --------------  
> 2026-07-24 06:22:18,540: WARNING - INSERT INTO `oc_reactions` VALUES

If there is something wrong in the database, perhaps you need repair it before, but it’s hard to try, perhaps deleting or recreating the table `oc_reactions`… not easy

---

<div class="post-metadata">

### Author: ![Cys](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@Cys](https://forum.yunohost.org/u/Cys)
#### Post date: [July 24, 2026, 5:21pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/3 "2026-07-24T17:21:48Z")

</div>

Thanks for your help @rodinux .

What sound strange to me is that I tried to restore a previous backup of Nextcloud (not a pre-upgrade one) but I have the same issue although the backup was successfull. How could it be possible ?

To your point of view, the only way is a fresh reinstall of Nextcloud ? 😱

---

<div class="post-metadata">

### Author: ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)
#### Post date: [July 24, 2026, 7:58pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/4 "2026-07-24T19:58:13Z")

</div>

Have you tried this?

```auto
yunohost app shell nextcloud 
php occ maintenance:repair

```

---

<div class="post-metadata">

### Author: ![Cys](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@Cys](https://forum.yunohost.org/u/Cys)
#### Post date: [July 25, 2026, 5:59am UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/5 "2026-07-25T05:59:57Z")

</div>

Thanks @otm33 : yes, I tried this (I saw this trick in another post) but this does not work as nextcloud has been removed by the upgrade process failed.

`#yunohost app shell nextcloud `  
**`Error:`** ` There doesn't seem to be any manifest file in /etc/yunohost/apps/nextcloud ... It looks like an app was not correctly installed/removed.`

---

<div class="post-metadata">

### Author: ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)
#### Post date: [July 27, 2026, 8:54pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/6 "2026-07-27T20:54:07Z")

</div>

I would try restoring the pre-upgrade archive or the full backup with

```auto
yunohost backup restore nextcloud_archive_name --no-remove-on-failure
# and 
yunohost app shell nextcloud 
php occ maintenance:repair

```

---

<div class="post-metadata">

### Author: ![Cys](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@Cys](https://forum.yunohost.org/u/Cys)
#### Post date: [July 28, 2026, 4:55pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/7 "2026-07-28T16:55:30Z")

</div>

I didn’t know this feature : thanks @otm33 . I will try this but I’ll have to start from a new instance of Yunohost : I really had to restart Nextcloud and thanks to the exports I did from calendar and contact, I managed to install a fresh Nextcloud with only theses two services restored. But I will clearly check your idea as I need to find back somes files and accounts I couldn’t recover.

---

<div class="post-metadata">

### Author: ![aoz](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@aoz](https://forum.yunohost.org/u/aoz)
#### Post date: [July 29, 2026, 2:38pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/8 "2026-07-29T14:38:35Z")

</div>

J’ai eu le même soucis, j’ai restauré la sauvegarde pre-upgrade et j’ai retrouvé mon instance Nextcloud, ouf !

Pourquoi l’upgrade a planté ? je ne sais pas…

———————————-

I had the same problem; I restored the pre-upgrade backup and got my Nextcloud instance back—phew!

Why did the upgrade fail? I don’t know…

---

<div class="post-metadata">

### Author: ![Cys](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@Cys](https://forum.yunohost.org/u/Cys)
#### Post date: [August 9, 2026, 12:31pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/9 "2026-08-09T12:31:17Z")

</div>

Hi there ! At least I managed to reinstall Yunohost on an old PC to test the recommandation of @otm33 . But I still have one question : how could I import the preupgrade backup on this new instance to be able to run the “yunohost backup restore” command line ? I don’t see any “import” link on the web admin interface.

Thanks !

---

<div class="post-metadata">

### Author: ![Cys](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@Cys](https://forum.yunohost.org/u/Cys)
#### Post date: [August 9, 2026, 12:37pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/10 "2026-08-09T12:37:42Z")

</div>

Ooops, shame on me : answer is in the wiki :

By default, backups are to be placed in `/home/yunohost.backup/archives/`.

Just need to put it in this place

---

<div class="post-metadata">

### Author: ![Cys](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@Cys](https://forum.yunohost.org/u/Cys)
#### Post date: [August 9, 2026, 1:03pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/11 "2026-08-09T13:03:40Z")

</div>

OK, test done … but on issue to go further : the Nextcloud restore process check the domain name, and of course my test domain is not my production one :

**Error :** Failed to read info for nextcloud : Domaine ‘[xxxxx.nohost.me](http://xxxxx.nohost.me)’ unknown

I checked this time but I don’t see any option “–do-not-check\_domain”.

Anyone know how could I force a new domain for the archive restoration ?

---

<div class="post-metadata">

### Author: ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)
#### Post date: [August 10, 2026, 1:34pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/12 "2026-08-10T13:34:49Z")

</div>

Just add it to the webadmin \> restore \> change url

---

<div class="post-metadata">

### Author: ![Cys](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@Cys](https://forum.yunohost.org/u/Cys)
#### Post date: [August 10, 2026, 2:23pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/13 "2026-08-10T14:23:33Z")

</div>

I’m sorry, I don’t kown where is the “change url” on the restore web page (I only have “Restore” button on the bottom of the web page when I select a local backup archive).

But the fact is I need to run the restore process on cli to set the following parameters :

```auto
yunohost backup restore nextcloud_archive_name --no-remove-on-failure
# and 
yunohost app shell nextcloud 
php occ maintenance:repair

```

Maybe the “change url” is possible this way ?

---

<div class="post-metadata">

### Author: ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)
#### Post date: [August 10, 2026, 2:55pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/14 "2026-08-10T14:55:42Z")

</div>

Change url is available in the webadmin \>applications\> your application \> scroll down. Some apps don’t support it

---

<div class="post-metadata">

### Author: ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)
#### Post date: [August 10, 2026, 4:22pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/15 "2026-08-10T16:22:19Z")

</div>

Try restoring using`yunohost backup restore XXXX `with` --no-remove-on-failure` flag and, once done, changing the url from the app web page.

---

<div class="post-metadata">

### Author: ![Cys](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@Cys](https://forum.yunohost.org/u/Cys)
#### Post date: [August 11, 2026, 4:19pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/16 "2026-08-11T16:19:44Z")

</div>

I tried again but the app can’t be reinstalled as the restore process failed (sorry, french logs) :

```auto
sudo yunohost backup restore nextcloud-pre-upgrade2.tar --no-remove-on-failure
[sudo] Mot de passe de admin : 
Info : Préparation de l'archive pour restauration…
Info : Restauration de nextcloud…
Erreur : Failed to read info for nextcloud : Domaine 'xxxxxx.nohost.me' inconnu
Info : Provisioning sources...
Info : Provisioning system_user...
Info : Provisioning install_dir...
Info : Provisioning data_dir...
Info : Provisioning permissions...
Attention : Failed to provision permissions : Domaine 'xxxxxx.nohost.me' inconnu
Info : Deprovisioning sources...
Info : Deprovisioning system_user...
Info : Deprovisioning install_dir...
Info : Deprovisioning data_dir...
Info : Deprovisioning permissions...
Erreur : L'allocation automatique des ressources (provisioning), la suppression d'accès à ces ressources (déprovisioning) ou la mise à jour des ressources pour nextcloud a échoué : Domaine 'xxxxx.nohost.me' inconnu
Info : L'opération 'Restaurer 'nextcloud' depuis une sauvegarde' a échoué ! Pour obtenir de l'aide, merci de partager le journal de l'opération en utilisant la commande 'yunohost log share 20260811-161119-backup_restore_app-nextcloud'
Erreur : The following critical error happened during restoration: L'opération 'Restaurer 'nextcloud' depuis une sauvegarde' a échoué ! Pour obtenir de l'aide, merci de partager le journal de l'opération en utilisant la commande 'yunohost log share 20260811-161119-backup_restore_app-nextcloud'

```

After this failure, I still don’t have any Nextcloud in the Apps menu :

 ![image](https://forum.yunohost.org/uploads/default/original/2X/7/75473f2c4a5998e6e7a93495245e2a5eb6d1065d.png)

---

<div class="post-metadata">

### Author: ![jarod5001](https://forum.yunohost.org/user_avatar/forum.yunohost.org/jarod5001/32/5323_2.png) [@jarod5001](https://forum.yunohost.org/u/jarod5001)
#### Post date: [August 11, 2026, 4:28pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/17 "2026-08-11T16:28:42Z")

</div>

You have to add the domain on which you installed nextcloud before restoring it, even if you will not use it. You will be able to restore the app.  
After your app is restored, you can move it to another domain / location

---

<div class="post-metadata">

### Author: ![Cys](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@Cys](https://forum.yunohost.org/u/Cys)
#### Post date: [August 12, 2026, 7:31am UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/18 "2026-08-12T07:31:48Z")

</div>

Thanks for this idea @jarod5001 . But as my prod domain is a [nohost.me](http://nohost.me), when I tried I could’t add another [nohost.me](http://nohost.me) site on my Yunohost test env (and I can’t even remove the test domain to replace it by the prod one on this env).

---

<div class="post-metadata">

### Author: ![otm33](https://forum.yunohost.org/user_avatar/forum.yunohost.org/otm33/32/11941_2.png) [@otm33](https://forum.yunohost.org/u/otm33)
#### Post date: [August 12, 2026, 1:55pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/19 "2026-08-12T13:55:05Z")

</div>

@Cys

Could you try this :

1. Change the url in the archive `settings.yml` file

- `cd /home/yunohost.backup/archives/`  
locate your _`2026_nextcloud_archive`_

- `vim 2026_nextcloud_archive`

- modify the nextcloud url in  
`apps/nextcloud/settings/settings.yml` : select with arrow keys and press enter \>  
select the `domain` line with arrow keys, press `i` key to edit \> change the url from your\ __old\_domain_ to your\__ new\_domain_ \> press `escape` key \> type `:wqa!` to write the change.

1. Restore the archive

`yunohost backup restore `_`2026_nextcloud_archive`_` --no-remove-on-failure`

The log will throw an error but nextcloud app will be partially restored

1. Upgrade the nextcloud app

`yunohost app upgrade nextcloud --force -b`

Check `/var/www/nextcloud/config/config.php` to make sure that _`trusted_domains`_ contains _your\_new\_domain_ -if needed add it and `systemctl restart php8.4-fpm`-

You also may need to run  
`sudo yunohost app shell nextcloud`  
`php occ upgrade`  
`php occ maintenance:repair`

---

<div class="post-metadata">

### Author: ![Cys](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@Cys](https://forum.yunohost.org/u/Cys)
#### Post date: [August 22, 2026, 4:52pm UTC](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674/20 "2026-08-22T16:52:53Z")

</div>

Hi @otm33

I tried several times but … it still failed 😢 Nevertheless, a good point : I am one step ahead. But Nextcloud is not up and running :

- I managed to edit the archive (but not on the Yunohost server, I had to download it)
- Once sent back to the server, the restore process worked with errors as awaited
- But I couldn’t upgrade Nextcloud. An error occured ([https://paste.yunohost.org/raw/egujiyewib](https://paste.yunohost.org/raw/egujiyewib))
- Despite of this, I tried to run the Nextcloud shell but I also got errors :

`nextcloud@xxxx:~$ php occ upgrade `  
`Your data directory is invalid. `  
`Ensure there is a file called ".ncdata" in the root of the data directory. It should have the content: "# Nextcloud data directory" `

`An unhandled exception has been thrown: `  
`Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:144 `  
`Stack trace: `  
`#0 /var/www/nextcloud/console.php(86): OC\Console\Application->loadCommands() `  
`#1 /var/www/nextcloud/occ(33): require_once('...') `  
`#2 {main}nextcloudphp occ maintenance:repair^C:repair `  
`nextcloud@xxxx:~$ php occ maintenance:repair `  
`Your data directory is invalid. `  
`Ensure there is a file called ".ncdata" in the root of the data directory. It should have the content: "# Nextcloud data directory" `

`An unhandled exception has been thrown: `  
`Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:144 `  
`Stack trace: `  
`#0 /var/www/nextcloud/console.php(86): OC\Console\Application->loadCommands() `  
`#1 /var/www/nextcloud/occ(33): require_once('...') `  
`#2 {main}nextcloud@xxxx:~$ exit `

I’m afraid it’s quiet unsolvable.

Thank’s a lot for your help and your ideas.

[Next page](https://forum.yunohost.org/t/nextcloud-upgrade-to-34-0-2-failed-and-removed-34-0-1/42674.md?page=2)
