Borg error since I've installed Wireguard

My YunoHost server

Hardware: VPS bought online
YunoHost version: 11.2.4
I have access to my server : Through SSH | through the webadmin

Description of my issue

Hi,
my borg daily backup does fail systematically since the day I’ve installed wireguard. Here is the log :

Could not link /etc/wireguard/wg0.conf to /home/yunohost.backup/tmp/auto_wireguard/apps/wireguard/backup/etc/wireguard/wg0.conf ([Errno 17] File exists: '/etc/wireguard/wg0.conf' -> '/home/yunohost.backup/tmp/auto_wireguard/apps/wireguard/backup/etc/wireguard/wg0.conf') ... falling back to regular copy.
Traceback (most recent call last):
  File "/usr/bin/yunohost", line 77, in <module>
    yunohost.cli(
  File "/usr/lib/python3/dist-packages/yunohost/__init__.py", line 41, in cli
    ret = moulinette.cli(
  File "/usr/lib/python3/dist-packages/moulinette/__init__.py", line 110, in cli
    Cli(
  File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 503, in run
    ret = self.actionsmap.process(args, timeout=timeout)
  File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 580, in process
    return func(**arguments)
  File "/usr/lib/python3/dist-packages/yunohost/log.py", line 410, in func_wrapper
    result = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/yunohost/backup.py", line 2279, in backup_create
    backup_manager.backup()
  File "/usr/lib/python3/dist-packages/yunohost/backup.py", line 772, in backup
    method.mount_and_backup()
  File "/usr/lib/python3/dist-packages/yunohost/backup.py", line 1698, in mount_and_backup
    self._organize_files()
  File "/usr/lib/python3/dist-packages/yunohost/backup.py", line 1856, in _organize_files
    shutil.copy(path["source"], dest)
  File "/usr/lib/python3.9/shutil.py", line 418, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.9/shutil.py", line 244, in copyfile
    raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
shutil.SameFileError: '/etc/wireguard/wg0.conf' and '/home/yunohost.backup/tmp/auto_wireguard/apps/wireguard/backup/etc/wireguard/wg0.conf' are the same file

Any advice ?
Thank you
Fred

Known issue with no resolution so far: Borgbackup automatic backup fails: WARNING - Could not link /etc/wireguard/wg0.conf to ... · Issue #70 · YunoHost-Apps/wireguard_ynh · GitHub

wow, this is critical in my opinion.
My emails and nextcloud are hosted on my yunohost, so if my VPS crashes, I lose everything after wireguard installation date ?

IIRC you can exclude apps from being backed up by Borg while the issue is resolved. You could exclude Wireguard and back it up manually.

Oh. On the github issue, people seem to say that this workaround does not work. I’ll try

Borg is failed if any of the jobs has failed, even the other jobs have succeeded. It’s my understanding that wireguard is not backed up, but all the other apps are. You can use borg info ::_auto_app... or borg check... to verify what has and has not being saved.

In the borg app admin web interface, Main section, we have:

so try to exclude:wireguard (use the actual wireguard app name)

:+1:
Actually I’ve just listed the Apps I wanted to backup (which is exactly all apps but wireguard) and last status is Successful
I’d prefer having Wireguard backed up so that I do not lose configuration, but for now I’m relieved mail and nextcloud are ok.

1 Like

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