Automatic borg backup fail

,

Matériel: Raspberry Pi à la maison /
Version de YunoHost: 3.8.4.8 (stable).
J’ai accès à mon serveur : En SSH | Par la webadmin
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Description du problème

Version de borg-ynh: 1.1.10~ynh2

Bonjour,
je rencontre un problème avec mon installation de borg. Mon setup est celui décrit dans ce billet: How to backup your YunoHost server on another server
En gros, mon serveur yunohost est backupé sur une autre machine (non yunohost). Ça marchait très bien jusqu’à récemment, mais je ne suis pas sûr de l’origine du disfonctionnement. J’ai mise à jour yunohost, en plus d’installer en même temps un montage RAID sur mon serveur yunohost, et j’ai également changé de disque de sauvegarde sur mon serveur de sauvegarde - le tout le même jour (je pense que cette dernière modif est quand même suspecte).

Depuis, je peux toujours lancer des backup à la main sudo yunohost backup create -n test --methods borg_app --debug en revanche le backup automatique lui échoue. Voici ce que je vois avec un borg list:

auto_conf_30_06_20_00:00             Tue, 2020-06-30 01:00:29 [ac114cc7561dd3298d54f307719d6ef5176ffc249db39156cac338084d4b8ae7]
auto_data_30_06_20_00:00             Tue, 2020-06-30 01:00:58 [a443e0a75a38d03ed6ddc1f9b4554f4ee8b6044ff595e3ede5e30b4a61e05deb]
auto_conf_04_07_20_00:00             Sat, 2020-07-04 01:00:32 [a873dbeb5332912c69cefb3ce0085d25ad673c78c0dab5c951e8ea077c664647]
auto_data_04_07_20_00:00             Sat, 2020-07-04 01:01:01 [1f46187d65ce715767338a25781cd9b157fe2c5f7827e4a058dd246a26bb5140]
auto_conf_05_07_20_00:00             Sun, 2020-07-05 01:00:31 [3117adde58acd501ef60ce98e4be9674d537f21e6c331a7d93ba46d708aab664]
auto_data_05_07_20_00:00             Sun, 2020-07-05 01:01:00 [fcd8e81510a282c80489ebd1e63a7da82423c4124c9b70e1f44e48eabcca47f7]
auto_conf_06_07_20_00:00             Mon, 2020-07-06 01:00:32 [e943d97b44148d7c6e85836187dc759564b1147a5d017dac3a5a5736adde01ff]
auto_data_06_07_20_00:00             Mon, 2020-07-06 01:01:03 [3f18d0b026a5b54631d1054e950885507e1e24e46fc31caee50934602726304e]
test_06_07_20_18:19                  Mon, 2020-07-06 19:19:46 [9dcc2ece672c42b2efd35ccbf5fe5c766f627e73a8e608b4a69abf51a07f4ee0]
auto_conf_07_07_20_00:00             Tue, 2020-07-07 01:00:28 [332593489292acfbc532041a20890c6e5e083a7891d9fb85ec8e604e96270b56]
auto_data_07_07_20_00:00             Tue, 2020-07-07 01:01:13 [6398223555c624b7d2f54592561d4825a935a168c7ae2ccd626e627790d86355]
auto_conf_08_07_20_00:00             Wed, 2020-07-08 01:00:29 [a94d9a8d3c027e2db0cc74fbb7ae93130a0406f65f132aabf883ef5b28d7bd50]
auto_data_08_07_20_00:01             Wed, 2020-07-08 01:01:14 [a8d4fcb50aa1c8852a5c2e524265a5151f1340fe066ebc81b9f814b423da4509]
auto_conf_09_07_20_00:00             Thu, 2020-07-09 01:00:28 [cf28a77a680bcd0b8e1f75de5f1866932f5036f0578f3eb4168985e25a98cac7]
auto_data_09_07_20_00:00             Thu, 2020-07-09 01:01:13 [64035740d0df9d3a65e75d1a2caa098793cc6b5ef238e08d7e410b1670767952]
auto_conf_10_07_20_00:00             Fri, 2020-07-10 01:00:29 [b8c978faa6c78200d3e9ade1ba98ee9e6716c5ad41458c160f8282d0a19b5a7b]
auto_data_10_07_20_00:01             Fri, 2020-07-10 01:01:20 [786b5bb1ac401a27171dfe4ee8686e6fd9832bd4bf0fedf0d3c6089cc3260b35]
auto_conf_11_07_20_00:00             Sat, 2020-07-11 01:00:29 [a3dcf66d7d8da5e71df41f9a8796e675e838c768d846fa3500de33e2ff8da4b8]
auto_data_11_07_20_00:01             Sat, 2020-07-11 01:01:21 [8b515368c4bd783696572dbd19e61385e005368d702630b6e41af7c4dc1e0e02]
auto_conf_12_07_20_00:00             Sun, 2020-07-12 01:00:27 [0ea0f313faafa19d3d254b4eb4d9c8dc3739b67261cb913134eb3f0db73ee234]
auto_data_12_07_20_00:01             Sun, 2020-07-12 01:01:21 [e5e3c0d0e6f9aa72ca501cdb2380c1a27c351135b398c6b4bdcc4260eaea899c]

il me me manque toutes mes entrées pour piwigo, nextcloud & Cie…

Voici le message d’erreur que je vois dans /var/log/backup_borg.err

    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    Remote: bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    Remote: bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
    Remote: bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.
    A repository already exists at ssh://yunohost@raspberrypi.local/~/backup.

J’ai regardé un peu les issues sur github mais je n’ai rien trouvé de concluant.
Je ne comprends pas l’origine de ce message…

Au début en changeant de disque de sauvegarde, j’avais simplement cloné mon ancien répertoire de backup dans le nouveau avec un rsync. Voyant que ça n’allait pas, j’ai tout supprimé pour repart d’une base propre. Mais ça n’a rien changé au message d’erreur…

Bref, si quelqu’un a une piste je suis preneur.
Merci!

I published a new release to fix your issue. Do the upgrade tomorrow and it will be fixed.

Thanks a lot for your support! :heart_eyes:
I’ve updated to 1.1.10~ynh4 yesterday evening through tools upgrade (strange, I’m on the testing branch?) but no backup at all this night. Last entry is still 13/07/2020 at 1:00 AM.
Should I reboot the server?

Arf :confused: retry again to go on 1.1.10~ynh5 and you could test it works quickly with:

yunohost backup create --system conf_ldap --methods borg_app test

Seems it works:

admin@polochon:~ $ sudo yunohost backup create --system conf_ldap --methods borg_app test
Info: Creating a backup archive from the collected files…
Success! Backup created
name: 20200714-162607
results:
  apps:
  system:
    conf_ldap: Success
size: 118617

And on the remote: (last line)

pi@raspberrypi:~ $ borg list /media/usbdisk4To/data/YunohostBackup
Enter passphrase for key /media/usbdisk4To/data/YunohostBackup: 
auto_conf_30_06_20_00:00             Tue, 2020-06-30 01:00:29 [ac114cc7561dd3298d54f307719d6ef5176ffc249db39156cac338084d4b8ae7]
auto_data_30_06_20_00:00             Tue, 2020-06-30 01:00:58 [a443e0a75a38d03ed6ddc1f9b4554f4ee8b6044ff595e3ede5e30b4a61e05deb]
auto_conf_05_07_20_00:00             Sun, 2020-07-05 01:00:31 [3117adde58acd501ef60ce98e4be9674d537f21e6c331a7d93ba46d708aab664]
auto_data_05_07_20_00:00             Sun, 2020-07-05 01:01:00 [fcd8e81510a282c80489ebd1e63a7da82423c4124c9b70e1f44e48eabcca47f7]
auto_conf_06_07_20_00:00             Mon, 2020-07-06 01:00:32 [e943d97b44148d7c6e85836187dc759564b1147a5d017dac3a5a5736adde01ff]
auto_data_06_07_20_00:00             Mon, 2020-07-06 01:01:03 [3f18d0b026a5b54631d1054e950885507e1e24e46fc31caee50934602726304e]
test_06_07_20_18:19                  Mon, 2020-07-06 19:19:46 [9dcc2ece672c42b2efd35ccbf5fe5c766f627e73a8e608b4a69abf51a07f4ee0]
auto_conf_07_07_20_00:00             Tue, 2020-07-07 01:00:28 [332593489292acfbc532041a20890c6e5e083a7891d9fb85ec8e604e96270b56]
auto_data_07_07_20_00:00             Tue, 2020-07-07 01:01:13 [6398223555c624b7d2f54592561d4825a935a168c7ae2ccd626e627790d86355]
auto_conf_08_07_20_00:00             Wed, 2020-07-08 01:00:29 [a94d9a8d3c027e2db0cc74fbb7ae93130a0406f65f132aabf883ef5b28d7bd50]
auto_data_08_07_20_00:01             Wed, 2020-07-08 01:01:14 [a8d4fcb50aa1c8852a5c2e524265a5151f1340fe066ebc81b9f814b423da4509]
auto_conf_09_07_20_00:00             Thu, 2020-07-09 01:00:28 [cf28a77a680bcd0b8e1f75de5f1866932f5036f0578f3eb4168985e25a98cac7]
auto_data_09_07_20_00:00             Thu, 2020-07-09 01:01:13 [64035740d0df9d3a65e75d1a2caa098793cc6b5ef238e08d7e410b1670767952]
auto_conf_10_07_20_00:00             Fri, 2020-07-10 01:00:29 [b8c978faa6c78200d3e9ade1ba98ee9e6716c5ad41458c160f8282d0a19b5a7b]
auto_data_10_07_20_00:01             Fri, 2020-07-10 01:01:20 [786b5bb1ac401a27171dfe4ee8686e6fd9832bd4bf0fedf0d3c6089cc3260b35]
auto_conf_11_07_20_00:00             Sat, 2020-07-11 01:00:29 [a3dcf66d7d8da5e71df41f9a8796e675e838c768d846fa3500de33e2ff8da4b8]
auto_data_11_07_20_00:01             Sat, 2020-07-11 01:01:21 [8b515368c4bd783696572dbd19e61385e005368d702630b6e41af7c4dc1e0e02]
auto_conf_12_07_20_00:00             Sun, 2020-07-12 01:00:27 [0ea0f313faafa19d3d254b4eb4d9c8dc3739b67261cb913134eb3f0db73ee234]
auto_data_12_07_20_00:01             Sun, 2020-07-12 01:01:21 [e5e3c0d0e6f9aa72ca501cdb2380c1a27c351135b398c6b4bdcc4260eaea899c]
auto_conf_13_07_20_00:00             Mon, 2020-07-13 01:00:28 [b5ad35a39335d2632a42038885d0e472f23e0fb115e900132ca8515f18b42404]
auto_data_13_07_20_00:01             Mon, 2020-07-13 01:01:20 [dc6d6b88ef32225a52025b53862d06e4c828356f7aef392671537ef1ecf1d5f8]
20200714-162607_14_07_20_17:26       Tue, 2020-07-14 18:26:25 [840e68009d86e5a8f4fd8a113a81b063b258fc115f9c8a0f3b7b9c3bb6ae6921]

I’ll check tomorrow to see the result.

:tada:

 borg list /media/usbdisk4To/data/YunohostBackup        
Enter passphrase for key /media/usbdisk4To/data/YunohostBackup: 
auto_conf_30_06_20_00:00             Tue, 2020-06-30 01:00:29 [ac114cc7561dd3298d54f307719d6ef5176ffc249db39156cac338084d4b8ae7]
auto_data_30_06_20_00:00             Tue, 2020-06-30 01:00:58 [a443e0a75a38d03ed6ddc1f9b4554f4ee8b6044ff595e3ede5e30b4a61e05deb]
auto_conf_05_07_20_00:00             Sun, 2020-07-05 01:00:31 [3117adde58acd501ef60ce98e4be9674d537f21e6c331a7d93ba46d708aab664]
auto_data_05_07_20_00:00             Sun, 2020-07-05 01:01:00 [fcd8e81510a282c80489ebd1e63a7da82423c4124c9b70e1f44e48eabcca47f7]
auto_conf_06_07_20_00:00             Mon, 2020-07-06 01:00:32 [e943d97b44148d7c6e85836187dc759564b1147a5d017dac3a5a5736adde01ff]
auto_data_06_07_20_00:00             Mon, 2020-07-06 01:01:03 [3f18d0b026a5b54631d1054e950885507e1e24e46fc31caee50934602726304e]
test_06_07_20_18:19                  Mon, 2020-07-06 19:19:46 [9dcc2ece672c42b2efd35ccbf5fe5c766f627e73a8e608b4a69abf51a07f4ee0]
auto_conf_07_07_20_00:00             Tue, 2020-07-07 01:00:28 [332593489292acfbc532041a20890c6e5e083a7891d9fb85ec8e604e96270b56]
auto_data_07_07_20_00:00             Tue, 2020-07-07 01:01:13 [6398223555c624b7d2f54592561d4825a935a168c7ae2ccd626e627790d86355]
auto_conf_08_07_20_00:00             Wed, 2020-07-08 01:00:29 [a94d9a8d3c027e2db0cc74fbb7ae93130a0406f65f132aabf883ef5b28d7bd50]
auto_data_08_07_20_00:01             Wed, 2020-07-08 01:01:14 [a8d4fcb50aa1c8852a5c2e524265a5151f1340fe066ebc81b9f814b423da4509]
auto_conf_09_07_20_00:00             Thu, 2020-07-09 01:00:28 [cf28a77a680bcd0b8e1f75de5f1866932f5036f0578f3eb4168985e25a98cac7]
auto_data_09_07_20_00:00             Thu, 2020-07-09 01:01:13 [64035740d0df9d3a65e75d1a2caa098793cc6b5ef238e08d7e410b1670767952]
auto_conf_10_07_20_00:00             Fri, 2020-07-10 01:00:29 [b8c978faa6c78200d3e9ade1ba98ee9e6716c5ad41458c160f8282d0a19b5a7b]
auto_data_10_07_20_00:01             Fri, 2020-07-10 01:01:20 [786b5bb1ac401a27171dfe4ee8686e6fd9832bd4bf0fedf0d3c6089cc3260b35]
auto_conf_11_07_20_00:00             Sat, 2020-07-11 01:00:29 [a3dcf66d7d8da5e71df41f9a8796e675e838c768d846fa3500de33e2ff8da4b8]
auto_data_11_07_20_00:01             Sat, 2020-07-11 01:01:21 [8b515368c4bd783696572dbd19e61385e005368d702630b6e41af7c4dc1e0e02]
auto_conf_12_07_20_00:00             Sun, 2020-07-12 01:00:27 [0ea0f313faafa19d3d254b4eb4d9c8dc3739b67261cb913134eb3f0db73ee234]
auto_data_12_07_20_00:01             Sun, 2020-07-12 01:01:21 [e5e3c0d0e6f9aa72ca501cdb2380c1a27c351135b398c6b4bdcc4260eaea899c]
auto_conf_13_07_20_00:00             Mon, 2020-07-13 01:00:28 [b5ad35a39335d2632a42038885d0e472f23e0fb115e900132ca8515f18b42404]
auto_data_13_07_20_00:01             Mon, 2020-07-13 01:01:20 [dc6d6b88ef32225a52025b53862d06e4c828356f7aef392671537ef1ecf1d5f8]
20200714-162607_14_07_20_17:26       Tue, 2020-07-14 18:26:25 [840e68009d86e5a8f4fd8a113a81b063b258fc115f9c8a0f3b7b9c3bb6ae6921]
auto_conf_15_07_20_00:00             Wed, 2020-07-15 01:00:27 [cfc288a6d2547c3fe8cd19dcef091af4e5213bd035d9ad4dbce56400ef2b2acb]
auto_data_15_07_20_00:01             Wed, 2020-07-15 01:01:13 [d4ed4098669dd28be87ccaddde24f5a73736de5c45134115538a5c52d3594b99]
auto_borg_15_07_20_00:01             Wed, 2020-07-15 01:02:03 [711722e6dfe5899dd040dcfdf91ec8a1bd93bbe1835fac1c241a4c58eea93756]
auto_monitorix_15_07_20_00:02        Wed, 2020-07-15 01:02:49 [6b2ba39dc8854a67d3fd09ff2a200aa460b24f3e16b1d4b1f1792a70c93f0a75]
auto_nextcloud_15_07_20_00:04        Wed, 2020-07-15 01:04:31 [d7fd2409b15494edd14e02dfd50ba296ec363d8aecfad7aaa71bb8033ab7f2d6]
auto_phpmyadmin_15_07_20_00:34       Wed, 2020-07-15 01:34:54 [42b234d6c45f589aa97113730bce5934abbd6d920dfb930718c78ffe5dcc4cdd]
auto_piwigo_15_07_20_00:35           Wed, 2020-07-15 01:35:58 [bc4902d1987ffe4ed029caafeace2f2776bfeafba02f029d30e28da1e999a8f3]
auto_rainloop_15_07_20_00:50         Wed, 2020-07-15 01:50:50 [20fab798a56573c9b88871eb5702687b473ce269aa7e241881845045589f0655]
auto_ttrss_15_07_20_00:51            Wed, 2020-07-15 01:51:43 [cde1a7a335e94f6108d69e6a7488c8b02a51930029caff77662e6fda1385d27a]
auto_wallabag2_15_07_20_00:52        Wed, 2020-07-15 01:52:48 [edccf9c8a50e49b2b15c98b895d0cde47538f219dcaed7c541d5900702364a0e]

Good news this morning, backup are comeback!

Thanks a lot for your support!

I have 2 questions if you have time:

  • what’s happen? what whas really the issue?
  • it seems borg_ynh is always installed from the testing branch? Is it the normal behavior? Should I switch to the master branch?

The backup script used this command: yunohost app list --installed -b , but since 3.7 (or 3.8 don’t know exactly) the -b option has been removed. So the script failed.

A fix has been published in the borg app, but borg app already installed was not updated correctly for several reasons.

You should follow the master branch.

yunohost app upgrade -u https://github.com/YunoHost-Apps/borg_ynh/tree/master borg*

Thanks!!!

I don’t knoww if this is linked, but I don’t have any backup since July 13

Here is the log I have : https://paste.yunohost.org/racapokalu.py

And a small excerpt (as all apps fails with the same message) :

 # systemctl status --lines 100 borg.service                                                     
● borg.service - Run backup borg
   Loaded: loaded (/etc/systemd/system/borg.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2020-07-29 12:00:05 CEST; 4min 2s ago
  Process: 14489 ExecStart=/usr/local/bin/backup-with-borg (code=exited, status=1/FAILURE)
 Main PID: 14489 (code=exited, status=1/FAILURE)

juil. 29 11:59:54 myserver.fr backup-with-borg[14489]: Collecte des fichiers devant être sauvegardés pour l’application wallabag2 …
juil. 29 11:59:55 myserver.fr backup-with-borg[14489]: [+++.................] > Loading installation settings...
juil. 29 11:59:56 myserver.fr backup-with-borg[14489]: '/var/www/wallabag2/var/cache/prod' wasn't deleted because it doesn't exist.
juil. 29 11:59:56 myserver.fr backup-with-borg[14489]: [###+++..............] > Backing up the main app directory...
juil. 29 11:59:56 myserver.fr backup-with-borg[14489]: [######++++..........] > Backing up nginx web server configuration...
juil. 29 11:59:56 myserver.fr backup-with-borg[14489]: [##########+++.......] > Backing up php-fpm configuration...
juil. 29 11:59:57 myserver.fr backup-with-borg[14489]: [#############+++....] > Backing up the MySQL database...
juil. 29 11:59:58 myserver.fr backup-with-borg[14489]: Création d’une archive de sauvegarde à partir des fichiers collectés …
juil. 29 12:00:04 myserver.fr backup-with-borg[14489]: Échec de l’exécution du script : /etc/yunohost/hooks.d/backup_method/05-borg_app
juil. 29 12:00:05 myserver.fr backup-with-borg[14489]: Échec de la méthode de sauvegarde personnalisée à l’étape 'backup'
juil. 29 12:00:05 myserver.fr systemd[1]: borg.service: Main process exited, code=exited, status=1/FAILURE
juil. 29 12:00:05 myserver.fr systemd[1]: Failed to start Run backup borg.
juil. 29 12:00:05 myserver.fr systemd[1]: borg.service: Unit entered failed state.
juil. 29 12:00:05 myserver.fr systemd[1]: borg.service: Failed with result 'exit-code'.


Hmmm it seems it is not the same issue, in my case I didn’t have any error code.
Maybe you can open a new thread in the forum, so we can discuss about it.

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