Closed lightnin closed 1 year ago
@ljf, any idea what's the matter with the file?
Hi, same error here
Also worth noting that adding an exception to borgbackup to not backup wireguard in app settings no longer prevents the system from trying to back it up since the migration to bullseye. So the presence of the wireguard app on my system consistently causes the borgbackup service to fail, thus preventing automatic backups.
How is this specific to the wireguard - borg combo? Any hints on where to investigate?
same here, no solution found and it is anoying:
cat /var/log/yunohost/categories/operation/20230627-000322-backup_create.yml
args:
apps:
- wireguard
description: null
dry_run: false
methods:
- borg_app
name: auto_wireguard
output_directory: null
system: null
ended_at: 2023-06-27 00:03:25.577427
error: '''/etc/wireguard/wg0.conf'' and ''/home/yunohost.backup/tmp/auto_wireguard/apps/wireguard/backup/etc/wireguard/wg0.conf''
are the same file'
interface: cli
operation: backup_create
parent: null
related_to:
- - app
- wireguard
started_at: 2023-06-27 00:03:22.479313
success: false
yunohost_version: 11.1.21.4
also no effect even if i try to put wireguard in the exceptions for the borg backup... :/
for me the solution is to use the exact value of the apps to backup, for example:
yunohost app setting borg apps -v "etherpad_mypads,nextcloud,onlyoffice"
Same problem here.
We can backup everything exept wireguard, in this way if you add a new app, it will be backupped.
The issue is a combination of these two lines inside /etc/yunohost/apps/wireguard/scripts/backup
:
ynh_backup --src_path="/etc/wireguard"
ynh_backup --src_path="$(jq -r ".config_file_path" $install_dir/db/server/global_settings.json)" --not_mandatory
and a situation where global_settings.json
contains path starting with /etc/wireguard
:
$ jq -r ".config_file_path" /var/www/wireguard/db/server/global_settings.json
/etc/wireguard/wg0.conf
If you're positive you're not using config files outside of /etc/wireguard
a workaround would be commenting out the latter line.
After installing wireguard app yesterday, automatic borgbackup nightly backups that used to work fail. Filing this here because I think it's likely something configurable per app, and not the fault of borgbackup - but please correct me if wrong.
Collecting files to be backed up for wireguard... Loading installation settings... Declaring files to be backed up... Backup script completed for wireguard. (YunoHost will then actually copy those files to the archive). Creating a backup archive from the collected files... The archive will contain about 19.3MiB of data. The operation 'Create a backup archive' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20220706-231530-backup_create' to get help
Here is the log: https://paste.yunohost.org/raw/acomiyexik
This appears to be significant part: 2022-07-07 00:15:38,388: WARNING - 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. 2022-07-07 00:15:38,399: DEBUG - Copying 0.0016202926635742188MB to organize the archive
Thanks for all you do to make this great free software!