Upgrading borgbackup...
WARNING: You are using pip version 21.3; however, version 21.3.1 is available.
You should consider upgrading via the '/opt/borg-env/bin/python -m pip install --upgrade pip' command.
should I?
I guess pip is part of ynh system, not just a borg dependency so I guess it’s safer let ynh select what version is to use.
On my side, I have, since a few weeks now (yes I know, it’s bad to wait) errors on each backups.
I have 2 backups to the same repo (one daily for nextcloud+system, one weekly for the rest).
Here is a log I got this night : https://paste.yunohost.org/raw/upedavupin.hs
Since I upgraded to YunoHost 11, borg do not work anymore.
Even in command line, I have this error :
~ borg -V
Traceback (most recent call last):
File "/opt/borg-env/bin/borg", line 6, in <module>
from borg.archiver import main
ModuleNotFoundError: No module named 'borg'
I installed Borg app on my yuno (Stable, Debian 10 based) using CLI, and wanted to backup on a local folder (/home/backup/borg).
Tried to restart the service, but its status stay on “activating” :
$service borg status
● borg.service - Run backup borg
Loaded: loaded (/etc/systemd/system/borg.service; static; vendor preset: enabled)
Active: activating (start) since Tue 2022-06-28 20:16:07 CEST; 1 day 18h ago
Main PID: 18279 (sudo)
Tasks: 4 (limit: 4605)
Memory: 17.6M
CGroup: /system.slice/borg.service
├─18279 /usr/bin/sudo /usr/local/bin/backup-with-borg borg
├─18285 /bin/bash /usr/local/bin/backup-with-borg borg
├─18288 sudo yunohost app setting borg last_run -v 220628_2016
└─18290 /usr/bin/python3 /usr/bin/yunohost app setting borg last_run -v 220628_2016
Jun 29 13:20:07 server.noho.st sudo[18279]: Still waiting...
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
All other Yunohost automated actions (Diagnosis, etc…) are blocked by this.
I think I misuse the app. Do I have to install the Borg Server app on the same server to do local backup with borg ?
The service should not be running everytime. It’s running only when the cron (or systemd timer) trigger it.
“All other Yunohost automated actions (Diagnosis, etc…) are blocked by this.” → are you sure that your server was not just backing up (it could take a loooong time the first time). It’s normal to not be able to do yunohost action if your backup is running.
Waited almost 3 days before killing the process, the folder size did not change, no CPU activity when looking on htop (when restic run his own backup on distant server, the CPU is under moderate to heavy load).
Reinstalled the app, changed the folder to /borgbackup (not in /home).
Plus, I think I used a password with spaces inside, which I should not have done. This time, used a random password without spaces.
Testing the reinstallation with systemctl start borg
The backup ran correctly, but got this on error log :
Failed to format translatable string 'backup_method_custom_finished': 'Custom backup method '{method}' finished' with arguments '()' and '{}', raising error: KeyError('method') (don't panic this is just a warning)
mysqldump: Got error: 1049: "Unknown database 'monitorix'" when selecting the database
Could not back up monitorix
Nothing to save
Well, Monitorix seems to be not backuped, not really a concern.
Anyway, the service is failed :
root@myserver:/var/log/borg# systemctl status borg.service
● borg.service - Run backup borg
Loaded: loaded (/etc/systemd/system/borg.service; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2022-07-02 14:11:51 CEST; 59min ago
Process: 32656 ExecStart=/usr/bin/sudo /usr/local/bin/backup-with-borg borg (code=exited, status=1/FAILURE)
Main PID: 32656 (code=exited, status=1/FAILURE)
Jul 02 14:11:51 myserver.noho.st sudo[14846]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost app setting borg mailalert
Jul 02 14:11:51 myserver.noho.st sudo[14846]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jul 02 14:11:51 myserver.noho.st sudo[14846]: pam_unix(sudo:session): session closed for user root
Jul 02 14:11:51 myserver.noho.st sudo[14848]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost app setting borg state -v failed
Jul 02 14:11:51 myserver.noho.st sudo[14848]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jul 02 14:11:51 myserver.noho.st sudo[14848]: pam_unix(sudo:session): session closed for user root
Jul 02 14:11:51 myserver.noho.st sudo[32656]: pam_unix(sudo:session): session closed for user root
Jul 02 14:11:51 myserver.noho.st systemd[1]: borg.service: Main process exited, code=exited, status=1/FAILURE
Jul 02 14:11:51 myserver.noho.st systemd[1]: borg.service: Failed with result 'exit-code'.
Jul 02 14:11:51 myserver.noho.st systemd[1]: Failed to start Run backup borg.
Edit : tried yunohost service restart borg : the command run endless, blocking all further yunohost commands.
Restarted the service with a classic service borg restart works (but the status of the service is still Active : failed)
Hello,
I think I can prospect to found an answer, but I do it here…
So, I have a server A on a VPS with two Borg Backup.
The first one borg make a daily backup on an external server B, hosted at home on a Borg Server…
The second one borg__2 make a daily backup on a local folder /mnt/backups/borgachives
The url /mnt/backups is a disk partition which have also a folder archives with a symlink
$ ls -l /home/yunohost.backup/
total 4
lrwxrwxrwx 1 root root 21 Dec 10 2021 archives -> /mnt/backups/archives
drwxrwxrwx 2 root root 4096 Jul 2 04:09 tmp
I think the first backup from server A to server B do also the second local backup and is a deduplicated backup.
How can I configure this first borg backup to do not included the borg__2 and the folder /mnt/backups/borgarchives ??