# Borg and Nextcloud fail

**URL:** https://forum.yunohost.org/t/borg-and-nextcloud-fail/31221
**Category:** Support apps
**Tags:** nextcloud, borg, backup, english
**Created:** [September 22, 2024, 7:06am UTC](https://forum.yunohost.org/t/borg-and-nextcloud-fail/31221 "2024-09-22T07:06:34Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![ghose](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ghose/32/10939_2.png) [@ghose](https://forum.yunohost.org/u/ghose)
#### Post date: [September 22, 2024, 7:06am UTC](https://forum.yunohost.org/t/borg-and-nextcloud-fail/31221/1 "2024-09-22T07:06:34Z")

</div>

**What type of hardware are you using** : Raspberry Pi 3, 4+  
**What YunoHost version are you running** : 11.2.30.2  
**What app is this about** : Nextcloud, Borg

### Describe your issue

borg is «failed» since two days ago because Nextcloud backup fails, the other installed apps are backuped (I have not check integrity data etc, they are just listed).

I’ve tried to `create` a backup manually (as root) with

`yunohost backup create -n auto_nextcloud --method borg_app --apps nextcloud`

and get a weird error

```auto
error: '''/etc/nginx/conf.d/nc.domain2.tld.d/nextcloud.conf'' and ''/home/yunohost.backup/tmp/auto_nextcloud/apps/nextcloud/backup/etc/nginx/conf.d/nc.domain2.tld.d/nextcloud.conf''
  are the same file'

```

and borg fails to backup.

I’ve deleted that _tmp file_and try again but borg fails again with the same issue

Nextcloud instance works fine so far, no errors reported, so I think it’s about borg or younohost declaring what files should be bakcuped, but **Nextcloud was updated to the latest version two days ago** , so a finger points to nextcloud too.

I mean, I have no idea.

Thank you. I did not want to open another “borg fails thread but…” ☹

### Share relevant logs or error messages

[https://paste.yunohost.org/raw/adulaqulim](https://paste.yunohost.org/raw/adulaqulim)

### Edit

I’ve have manually created a backup from ynh webadmin and it has not reported errors.

I’m considering to restore nextcloud pre-upgrade backup

# Edit 2

reversed to nextcloud 29.0.5 and then `systemctl start borg` and backup job reported no errors.

so **I guess** something in nextcloud 29.0.7 is not correct in ynh 🤷 IDK

---

<div class="post-metadata">

### Author: ![Hujino](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/h/b2d939/32.png) [@Hujino](https://forum.yunohost.org/u/Hujino)
#### Post date: [September 25, 2024, 6:40am UTC](https://forum.yunohost.org/t/borg-and-nextcloud-fail/31221/2 "2024-09-25T06:40:49Z")

</div>

Hello,

I got this error too

---

<div class="post-metadata">

### Author: ![orhtej2](https://forum.yunohost.org/user_avatar/forum.yunohost.org/orhtej2/32/8943_2.png) [@orhtej2](https://forum.yunohost.org/u/orhtej2)
#### Post date: [September 25, 2024, 10:48am UTC](https://forum.yunohost.org/t/borg-and-nextcloud-fail/31221/3 "2024-09-25T10:48:20Z")

</div>

After banging my head against the wall I came up with the following tentative fix: [Fixed backup by orhtej2 · Pull Request #732 · YunoHost-Apps/nextcloud\_ynh · GitHub](https://github.com/YunoHost-Apps/nextcloud_ynh/pull/732)

Basically nginx conf was declared twice for backup, and mount-based backups (like borg, or actually ynh core itself) don’t like that.

---

<div class="post-metadata">

### Author: ![PhilienTaylor](https://forum.yunohost.org/user_avatar/forum.yunohost.org/philientaylor/32/10504_2.png) [@PhilienTaylor](https://forum.yunohost.org/u/PhilienTaylor)
#### Post date: [September 25, 2024, 1:25pm UTC](https://forum.yunohost.org/t/borg-and-nextcloud-fail/31221/4 "2024-09-25T13:25:28Z")

</div>

Thank you for making a tentative fix and sharing it! 🙂 What happens next? (Do we wait for the pull request to be merged?)

---

<div class="post-metadata">

### Author: ![ericg](https://forum.yunohost.org/user_avatar/forum.yunohost.org/ericg/32/1543_2.png) [@ericg](https://forum.yunohost.org/u/ericg)
#### Post date: [September 25, 2024, 1:37pm UTC](https://forum.yunohost.org/t/borg-and-nextcloud-fail/31221/5 "2024-09-25T13:37:54Z")

</div>

Fix merged to master

---

<div class="post-metadata">

### Author: ![oberger](https://forum.yunohost.org/user_avatar/forum.yunohost.org/oberger/32/6081_2.png) [@oberger](https://forum.yunohost.org/u/oberger)
#### Post date: [September 27, 2024, 11:43am UTC](https://forum.yunohost.org/t/borg-and-nextcloud-fail/31221/6 "2024-09-27T11:43:24Z")

</div>

Where should we apply the fix, in the meantime ?

---

<div class="post-metadata">

### Author: ![oberger](https://forum.yunohost.org/user_avatar/forum.yunohost.org/oberger/32/6081_2.png) [@oberger](https://forum.yunohost.org/u/oberger)
#### Post date: [September 27, 2024, 11:55am UTC](https://forum.yunohost.org/t/borg-and-nextcloud-fail/31221/7 "2024-09-27T11:55:41Z")

</div>

> [@ghose](#):
>
> yunohost backup create -n auto\_nextcloud --method borg\_app --apps nextcloud

Responding to myself: one may apply the change at [Fixed backup by orhtej2 · Pull Request #732 · YunoHost-Apps/nextcloud\_ynh · GitHub](https://github.com/YunoHost-Apps/nextcloud_ynh/pull/732/files#diff-d7c669d8e7971ae1796dc06b149cbfaee4a56384abaeb3bd0a85077e7c3cb141) on `/etc/yunohost/apps/nextcloud/scripts/backup`

Hope this helps,

---

<div class="post-metadata">

### Author: ![Qprq](https://forum.yunohost.org/user_avatar/forum.yunohost.org/qprq/32/6217_2.png) [@Qprq](https://forum.yunohost.org/u/Qprq)
#### Post date: [October 1, 2024, 6:36pm UTC](https://forum.yunohost.org/t/borg-and-nextcloud-fail/31221/8 "2024-10-01T18:36:58Z")

</div>

Fonctionne parfaitement depuis trois jours ! Merci. ❤

---

<div class="post-metadata">

### Author: ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)
#### Post date: [October 16, 2024, 6:37pm UTC](https://forum.yunohost.org/t/borg-and-nextcloud-fail/31221/9 "2024-10-16T18:37:23Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
