yunohost-apps / borg_ynh Goto Github PK
View Code? Open in Web Editor NEWAn experimental Borg implementation for YunoHost
Home Page: https://www.borgbackup.org/
License: GNU Affero General Public License v3.0
An experimental Borg implementation for YunoHost
Home Page: https://www.borgbackup.org/
License: GNU Affero General Public License v3.0
If we reach the quota, prune can't be done cause the script failed on backup create.
In more there is no alert.
Hello,
When I do this command
BORG_RSH="ssh -i /root/.ssh/id_borg_ed25519 -oStrictHostKeyChecking=yes " borg list [email protected]:~/backup
as expected, it asks me the passphrase but when I write it, it doesn't work. I first thought it I made a mistake so I went to check in this file
sudo nano /etc/yunohost/hooks.d/backup_method/05-borg_app
and BORG_PASSPHRASE="xxxxx"
xxxxx is exactly what I wrote when the passphrase was requested.
Where am I wrong?
What should I do?
First off, so happy to be testing and using borg via yunohost. It's a great piece of software and has saved my data from hardware failure a couple of times now. I really hope we can get some nice easy integration in yunohost.
On a yunohost with a single app, jellyfin, it seems that when the backup is run it stops the jellyfin application, fails to back it up and doesn't restart it.
root@host:~# BORG_RSH="ssh -i /root/.ssh/id_borg_ed25519 -oStrictHostKeyChecking=yes " borg extract user@server:repo::_auto_borg-2021-05-28_00:01 --list
Enter passphrase for key ssh://user@server/./repo:
.
apps
apps/borg
apps/borg/backup
apps/borg/backup/usr
apps/borg/backup/usr/local
apps/borg/backup/usr/local/bin
apps/borg/backup/usr/local/bin/backup-with-borg
apps/borg/backup/etc
apps/borg/backup/etc/sudoers.d
apps/borg/backup/etc/sudoers.d/borg
apps/borg/backup/etc/systemd
apps/borg/backup/etc/systemd/system
apps/borg/backup/etc/systemd/system/borg.timer
apps/borg/backup/etc/systemd/system/borg.service
apps/borg/backup/etc/yunohost
apps/borg/backup/etc/yunohost/hooks.d
apps/borg/backup/etc/yunohost/hooks.d/backup_method
apps/borg/backup/etc/yunohost/hooks.d/backup_method/05-borg_app
apps/borg/backup/root
apps/borg/backup/root/.ssh
apps/borg/backup/root/.ssh/id_borg_ed25519
apps/borg/backup/root/.ssh/id_borg_ed25519.pub
apps/borg/settings
apps/borg/settings/settings.yml
apps/borg/settings/manifest.json
apps/borg/settings/permissions.yml
apps/borg/settings/scripts
apps/borg/settings/scripts/_common.sh
apps/borg/settings/scripts/install
apps/borg/settings/scripts/backup
apps/borg/settings/scripts/upgrade
apps/borg/settings/scripts/remove
apps/borg/settings/scripts/restore
apps/borg/settings/conf
apps/borg/settings/conf/systemd.timer
apps/borg/settings/conf/sudoer
apps/borg/settings/conf/backup-with-borg
apps/borg/settings/conf/backup_method
apps/borg/settings/conf/systemd.service
backup.csv
info.json
No jellyfin files seem to be there...
And the log of the backup itself goes :
root@etienne:~# yunohost log show 20210527-230143-backup_create
description: Create a backup archive
log_path: /var/log/yunohost/categories/operation/20210527-230143-backup_create.log
logs:
- 2021-05-28 00:01:49,311: DEBUG - + args_array=([s]=src_path= [d]=dest_path= [b]=is_big [m]=not_mandatory)
- 2021-05-28 00:01:49,312: DEBUG - + local -A args_array
- 2021-05-28 00:01:49,312: DEBUG - + local src_path
- 2021-05-28 00:01:49,313: DEBUG - + local dest_path
- 2021-05-28 00:01:49,314: DEBUG - + local is_big
- 2021-05-28 00:01:49,314: DEBUG - + local not_mandatory
- 2021-05-28 00:01:49,315: DEBUG - + ynh_handle_getopts_args --src_path=/etc/systemd/system/jellyfin.service
- 2021-05-28 00:01:49,316: DEBUG - + set +o xtrace
- 2021-05-28 00:01:49,417: DEBUG - + dest_path=
- 2021-05-28 00:01:49,418: DEBUG - + is_big=0
- 2021-05-28 00:01:49,419: DEBUG - + not_mandatory=0
- 2021-05-28 00:01:49,421: DEBUG - + BACKUP_CORE_ONLY=0
- 2021-05-28 00:01:49,421: DEBUG - + test -n jellyfin
- 2021-05-28 00:01:49,422: DEBUG - ++ ynh_app_setting_get --app=jellyfin --key=do_not_backup_data
- 2021-05-28 00:01:49,423: DEBUG - ++ local legacy_args=ak
- 2021-05-28 00:01:49,424: DEBUG - ++ args_array=([a]=app= [k]=key=)
- 2021-05-28 00:01:49,424: DEBUG - ++ local -A args_array
- 2021-05-28 00:01:49,425: DEBUG - ++ local app
- 2021-05-28 00:01:49,426: DEBUG - ++ local key
- 2021-05-28 00:01:49,426: DEBUG - ++ ynh_handle_getopts_args --app=jellyfin --key=do_not_backup_data
- 2021-05-28 00:01:49,427: DEBUG - ++ set +o xtrace
- 2021-05-28 00:01:49,543: DEBUG - ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
- 2021-05-28 00:01:49,544: DEBUG - ++ ynh_app_setting get jellyfin do_not_backup_data
- 2021-05-28 00:01:49,545: DEBUG - ++ set +o xtrace
- 2021-05-28 00:01:49,833: DEBUG - + do_not_backup_data=
- 2021-05-28 00:01:49,834: DEBUG - + '[' 0 -eq 1 ']'
- 2021-05-28 00:01:49,835: DEBUG - + '[' '!' -e /etc/systemd/system/jellyfin.service ']'
- 2021-05-28 00:01:49,836: DEBUG - + ynh_print_warn '--message=Source path '\''/etc/systemd/system/jellyfin.service'\'' does not exist'
- 2021-05-28 00:01:49,836: DEBUG - + local legacy_args=m
- 2021-05-28 00:01:49,837: DEBUG - + args_array=([m]=message=)
- 2021-05-28 00:01:49,838: DEBUG - + local -A args_array
- 2021-05-28 00:01:49,838: DEBUG - + local message
- 2021-05-28 00:01:49,839: DEBUG - + ynh_handle_getopts_args '--message=Source path '\''/etc/systemd/system/jellyfin.service'\'' does not exist'
- 2021-05-28 00:01:49,840: DEBUG - + set +o xtrace
- 2021-05-28 00:01:49,859: DEBUG - + ynh_print_log 'Source path '\''/etc/systemd/system/jellyfin.service'\'' does not exist'
- 2021-05-28 00:01:49,860: DEBUG - + echo -e 'Source path '\''/etc/systemd/system/jellyfin.service'\'' does not exist'
- 2021-05-28 00:01:49,862: DEBUG - + '[' 0 == 0 ']'
- 2021-05-28 00:01:49,868: WARNING - Source path '/etc/systemd/system/jellyfin.service' does not exist
- 2021-05-28 00:01:49,870: DEBUG - + echo /etc/systemd/system/jellyfin.service
- 2021-05-28 00:01:49,870: DEBUG - + grep --quiet /etc/fail2ban
- 2021-05-28 00:01:49,871: DEBUG - + return 1
- 2021-05-28 00:01:49,872: DEBUG - + ynh_exit_properly
- 2021-05-28 00:01:49,872: DEBUG - + local exit_code=1
- 2021-05-28 00:01:49,873: DEBUG - + rm -rf /var/cache/yunohost/download/
- 2021-05-28 00:01:49,874: DEBUG - + '[' 1 -eq 0 ']'
- 2021-05-28 00:01:49,875: DEBUG - + trap '' EXIT
- 2021-05-28 00:01:49,876: DEBUG - + set +o errexit
- 2021-05-28 00:01:49,876: DEBUG - + set +o nounset
- 2021-05-28 00:01:49,877: DEBUG - + sleep 0.5
- 2021-05-28 00:01:50,384: ERROR - Could not back up jellyfin
[snip]
Full https://paste.yunohost.org/raw/ritirijuxo
On thing I notice is that it's looking for the service file in the wrong place, it's actually in /lib/systemd/system/jellyfin.service
Out of curiosity, if there is any particular required feature.
envoyer un mail de backup réussi après un backup failed, meme quand l'option d'envoyer un mail que lorsque ça fail est choisie. Sinon on croit que tout est mort :D
As I evoked in this topic on the forum, I recently discovered that my server hadn't been backed up for quite a while, because of a lack of space in the target server.
I'm trying to achieve two things to avoid this problem:
I believe the first point can be achieved by fiddling around with the list of directories that borg is backing up, but I don't want to break the way borg_ynh makes it easy to add/remove some apps to the backup. Anyone has some advice on a good way to do that?
Also would be very grateful for suggestions on how to achieve the second point.
Thanks a lot for any advice and for this great app.
After installing Borg Yunohost does not give the user the ability to view, change or update settings entered at install time. (For example - encryption passphrase, or remote servers.)
Ideally it should be possible to configure and update configurations for common backup scenarios (i.e. to remote server like Borgbase, or another yunhosted borg server) without needing to access the command line.
Hello!
I just got a new VPS for storing my backup, where I installed yunohost followed by borgbackup app.
Then, on my old yunohost server I just installed the borg app.
I followed the given instructions in the README.md file :-)
Then I type the following commands and retrieve an error:
# SRV=backupuser@mybackupserverip:~/backup
# BORG_RSH="ssh -i /root/.ssh/id_borg_ed25519 -oStrictHostKeyChecking=yes " borg list $SRV
Connection closed by remote host. Is borg working on the server?
Just to be sure, I have my public/private keys on my old server to backup, and I gave this public key while installing borgserver on my new server storing the backups.
I have absolutely no idea is that's a ssh or borg issue.
Léo
I have followed the instructions and I get into several issues. I was able to fix most of them, but this one, I can't find a solution.
I have setup borg on server A and borgserver on server B, both on YNH 4.X
BORG_RSH="ssh -i /root/.ssh/id_borg_ed25519 -oStrictHostKeyChecking=yes " borg list [email protected]:~/backup
I get a password prompt, which should not happen, since I'm using RSA keys.
I tried the same process with an empty test server A and the same server B, it seems the process worked flawlessly, I don't understand where is the issue. Note that I try the same command as above on this setup and I'm able to login in SSH without password.
Any ideas ?
Borg configured to backup on a local storage.
Logs :
The backup miserably failed to backup borg application.
Source path '/root/.ssh/id_borg_ed25519' does not exist
Impossible de sauvegarder borg
So it also blocks update of the app :
L’opération 'Mettre à jour l’application 'borg'' a échoué ! Pour obtenir de l’aide, merci de partager le journal de l’opération en cliquant ici
Impossible de mettre à jour borg : Une erreur s’est produite durant l’exécution du script de mise à niveau de l’application
Backup failed, the upgrade process was aborted.
Hello,
I installed Borg on my Yunohost servers and when I want to see if I can read backups, I can't because passphrase seems incorrect. So I dug into it.
The problem is, I think, in this script :
# cat /etc/yunohost/hooks.d/backup_method/05-borg_app
(...)
BORG_PASSPHRASE="RGjauGbbg6d$jj77g*piabfbfGedE"
(...)
(I changed the passphrase, obviously..)
Yunohost saved the complete passphrase :
# yunohost app setting borg passphrase
RGjauGbbg6d$jj77g*piabfbfGedE
But "$jj77g" is considered like an empty variable. Finally, borg used "RGjauGbbg6d*piabfbfGedE". We have to change " -> ' in the script.
$ PASSPHRASE="gaghtbgg$TEXT*gloa"
$ echo $PASSPHRASE
gaghtbgg*gloa
$ PASSPHRASE='gaghtbgg$TEXT*gloa'
$ echo $PASSPHRASE
gaghtbgg$TEXT*gloa
Perhaps we should add a warning during installation to say it's better to avoid some special characters ( ' , " , $ , .. ) ?
Failed to start Run backup borg
borg.service: Failed with result 'exit-code'
A clear and concise description of what the bug is.
from log below
/usr/local/bin/backup-with-borg: line 83: syntax error near unexpected token `fi'
Hardware: Raspberry Pi at home
YunoHost version: 4.2.7 (stable)
I have access to my server: Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
Using, or trying to install package version/branch:
If upgrading, current package version: version: 1.1.16~ynh21 (latest upgrade)
borg systemctl service executed without errors
Manually start borg service (I had seen borg failed in web interface)
systemctl start borg.service
borg.service - Run backup borg
Loaded: loaded (/etc/systemd/system/borg.service; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2021-08-19 05:56:57 BST; 1min 16s ago
Process: 1581 ExecStart=/usr/bin/sudo /usr/local/bin/backup-with-borg borg (code=exited, status=2)
Main PID: 1581 (code=exited, status=2)
Aug 19 05:56:56 domain.tld sudo[5577]: pam_unix(sudo:session): session closed for user root
Aug 19 05:56:56 domain.tld sudo[5579]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost app setting borg mailalert
Aug 19 05:56:56 domain.tld sudo[5579]: pam_unix(sudo:session): session opened for user root by (uid=0)
Aug 19 05:56:57 domain.tld sudo[5579]: pam_unix(sudo:session): session closed for user root
Aug 19 05:56:57 domain.tld sudo[1581]: /usr/local/bin/backup-with-borg: line 83: syntax error near unexpected token `fi'
Aug 19 05:56:57 domain.tld sudo[1581]: /usr/local/bin/backup-with-borg: line 83: `fi'
Aug 19 05:56:57 domain.tld sudo[1581]: pam_unix(sudo:session): session closed for user root
Aug 19 05:56:57 domain.tld systemd[1]: borg.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 19 05:56:57 domain.tld systemd[1]: borg.service: Failed with result 'exit-code'.
Aug 19 05:56:57 domain.tld systemd[1]: Failed to start Run backup borg.
Thanks.
Because borgserver_ynh's code assume the repo si ~/backup : https://github.com/YunoHost-Apps/borgserver_ynh/blob/testing/scripts/install#L72
Maybe I configured something wrong, but in my yunohost server, ynh diagnosis is raising errors saying that borg service is dead.
From what I understand, it makes sense that the service is dead, since it's starting only when it's making a backup.
It would be really nice indeed to know when backups are failing, but maybe the yunohost diagnosis should behave differently for borg_ynh service than other services. Maybe it should consider "dead" status to be ok, and raise an error if the status of the service is "failed".
But maybe I misunderstood something. Or I can imagine that it's not trivial to implement.
When I upgrade the app from 1.1.10~ynh6 to 1.1.13~ynh2, it doesn't do automatic backup. I think that it does run, but somehow it doesn't create the backups on the specified server like before.
I am not using the corresponding backup app on the server that is used for storage but rather I manually configured the user and certificates, maybe something changed there?
The backup is considered as "failed" in the log mails when an app don't has any backup script :
Warning: The application ssh_chroot_dir__2 has no backup script. This app won't be backuped.
Keep the warning in the log mails, but change the subject in "success" instead of "failed".
Borg backup at each start, even reboot...
Borg backup every week (in the middle of a night, no disturbance). It is enough for me. I don't need it to backup also everytime I reboot my server. I'd like to be able to stop the option to backup on startup.
yunohost app list --installed -b | grep id: | cut -d: -f2 gives errors on latest version of yunohost (specifically for the -b parameter)
should read
yunohost app list | grep id: | cut -d: -f2
I am trying to configure borg to backup to my repo at borgbase.com.
root@domain:~# yunohost app install https://github.com/YunoHost-Apps/borg_ynh
Indicate the server where you want put your backups: edited.repo.borgbase.com
Indicate the ssh user to use to connect on this server: edited
You are now about to define a new user password. The password should be at least 8 characters - though it is good practice to use longer password (i.e. a passphrase) and/or to use various kind of characters (uppercase, lowercase, digits and special characters).
Indicate a strong passphrase, that you will keep preciously if you want to be able to use your backups:
Would you like to backup your YunoHost configuration ? [yes | no] (default: yes): yes
Would you like to backup mails and user home directory ? [yes | no] (default: yes): yes
Which apps would you backup (list separated by comma or 'all') ? (default: all): all
Indicate the backup frequency (see systemd OnCalendar format) (default: Daily): Daily
Warning: Created symlink /etc/systemd/system/multi-user.target.wants/borg.service → /etc/systemd/system/borg.service.
Warning: Created symlink /etc/systemd/system/timers.target.wants/borg.timer → /etc/systemd/system/borg.timer.
Success! The SSOwat configuration has been generated
Success! Installation complete
Setup went fine, but when I go to start borg to ensure a successful backup, I get an error:
Jan 15 14:21:32 domain.tld systemd[1]: Starting Run backup borg...
Jan 15 14:21:35 domain.tld backup-with-borg[1820]: Script execution failed: /etc/yunohost/hooks.d/backup_method/05-borg_app
Jan 15 14:21:35 domain.tld backup-with-borg[1820]: Custom backup method failure on 'backup' step
Jan 15 14:21:36 domain.tld slapd[816]: <= mdb_equality_candidates: (cn) not indexed
Jan 15 14:21:36 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:36 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:36 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:36 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:36 domain.tld slapd[816]: <= mdb_substring_candidates: (sudoUser) not indexed
Jan 15 14:21:36 domain.tld sudo[1940]: root : TTY=unknown ; PWD=/home/yunohost.backup/tmp/auto_nextcloud/apps/nextcloud/backup ; USER=root ; COMMAND=/usr/bin/yunohost app setting nextcloud final_path --output-as plain --quiet
Jan 15 14:21:36 domain.tld sudo[1940]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 15 14:21:36 domain.tld sudo[1940]: pam_unix(sudo:session): session closed for user root
Jan 15 14:21:36 domain.tld slapd[816]: <= mdb_equality_candidates: (cn) not indexed
Jan 15 14:21:36 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:36 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:36 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:36 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:36 domain.tld slapd[816]: <= mdb_substring_candidates: (sudoUser) not indexed
Jan 15 14:21:36 domain.tld sudo[1943]: root : TTY=unknown ; PWD=/home/yunohost.backup/tmp/auto_nextcloud/apps/nextcloud/backup ; USER=root ; COMMAND=/usr/bin/yunohost app setting nextcloud domain --output-as plain --quiet
Jan 15 14:21:36 domain.tld sudo[1943]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 15 14:21:37 domain.tld sudo[1943]: pam_unix(sudo:session): session closed for user root
Jan 15 14:21:37 domain.tld slapd[816]: <= mdb_equality_candidates: (cn) not indexed
Jan 15 14:21:37 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:37 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:37 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:37 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:37 domain.tld slapd[816]: <= mdb_substring_candidates: (sudoUser) not indexed
Jan 15 14:21:37 domain.tld sudo[1946]: root : TTY=unknown ; PWD=/home/yunohost.backup/tmp/auto_nextcloud/apps/nextcloud/backup ; USER=root ; COMMAND=/usr/bin/yunohost app setting nextcloud db_name --output-as plain --quiet
Jan 15 14:21:37 domain.tld sudo[1946]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 15 14:21:37 domain.tld sudo[1946]: pam_unix(sudo:session): session closed for user root
Jan 15 14:21:37 domain.tld slapd[816]: <= mdb_equality_candidates: (cn) not indexed
Jan 15 14:21:37 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:37 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:37 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:37 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:37 domain.tld slapd[816]: <= mdb_substring_candidates: (sudoUser) not indexed
Jan 15 14:21:37 domain.tld sudo[1984]: root : TTY=unknown ; PWD=/home/yunohost.backup/tmp/auto_nextcloud/apps/nextcloud/backup ; USER=root ; COMMAND=/bin/cat /etc/yunohost/mysql
Jan 15 14:21:37 domain.tld sudo[1984]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 15 14:21:37 domain.tld sudo[1984]: pam_unix(sudo:session): session closed for user root
Jan 15 14:21:38 domain.tld slapd[816]: <= mdb_equality_candidates: (cn) not indexed
Jan 15 14:21:38 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:38 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:38 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:38 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:38 domain.tld slapd[816]: <= mdb_substring_candidates: (sudoUser) not indexed
Jan 15 14:21:38 domain.tld sudo[2008]: root : TTY=unknown ; PWD=/home/yunohost.backup/tmp/auto_nextcloud/apps/nextcloud/backup ; USER=root ; COMMAND=/usr/bin/yunohost app setting nextcloud backup_core_only --output-as plain --quiet
Jan 15 14:21:38 domain.tld sudo[2008]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 15 14:21:38 domain.tld sudo[2008]: pam_unix(sudo:session): session closed for user root
Jan 15 14:21:43 domain.tld backup-with-borg[1820]: Script execution failed: /etc/yunohost/hooks.d/backup_method/05-borg_app
Jan 15 14:21:43 domain.tld backup-with-borg[1820]: Custom backup method failure on 'backup' step
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_equality_candidates: (cn) not indexed
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_substring_candidates: (sudoUser) not indexed
Jan 15 14:21:44 domain.tld sudo[2066]: root : TTY=unknown ; PWD=/home/yunohost.backup/tmp/auto_rainloop/apps/rainloop/backup ; USER=root ; COMMAND=/usr/bin/yunohost app setting rainloop domain --output-as plain --quiet
Jan 15 14:21:44 domain.tld sudo[2066]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 15 14:21:44 domain.tld sudo[2066]: pam_unix(sudo:session): session closed for user root
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_equality_candidates: (cn) not indexed
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_substring_candidates: (sudoUser) not indexed
Jan 15 14:21:44 domain.tld sudo[2069]: root : TTY=unknown ; PWD=/home/yunohost.backup/tmp/auto_rainloop/apps/rainloop/backup ; USER=root ; COMMAND=/usr/bin/yunohost app setting rainloop path --output-as plain --quiet
Jan 15 14:21:44 domain.tld sudo[2069]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 15 14:21:44 domain.tld sudo[2069]: pam_unix(sudo:session): session closed for user root
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_equality_candidates: (cn) not indexed
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_equality_candidates: (sudoUser) not indexed
Jan 15 14:21:44 domain.tld slapd[816]: <= mdb_substring_candidates: (sudoUser) not indexed
Jan 15 14:21:44 domain.tld sudo[2072]: root : TTY=unknown ; PWD=/home/yunohost.backup/tmp/auto_rainloop/apps/rainloop/backup ; USER=root ; COMMAND=/usr/bin/yunohost app setting rainloop mysqlpwd --output-as plain --quiet
Jan 15 14:21:44 domain.tld sudo[2072]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jan 15 14:21:44 domain.tld sudo[2072]: pam_unix(sudo:session): session closed for user root
Jan 15 14:21:46 domain.tld backup-with-borg[1820]: Script execution failed: /etc/yunohost/hooks.d/backup_method/05-borg_app
Jan 15 14:21:46 domain.tld backup-with-borg[1820]: Custom backup method failure on 'backup' step
Jan 15 14:21:46 domain.tld systemd[1]: borg.service: Main process exited, code=exited, status=5/NOTINSTALLED
Jan 15 14:21:46 domain.tld systemd[1]: borg.service: Failed with result 'exit-code'.
Jan 15 14:21:46 domain.tld systemd[1]: Failed to start Run backup borg.
Is it failing on the "yunohost app setting nextcloud backup_core_only" step?
How can I proceed with fixing this?
Thanks
---
Automatic diagnosis data from YunoHost
host: Debian 9.6
kernel: 4.18.0-0.bpo.1-amd64
packages:
yunohost:
repo: stable
version: 3.3.3
yunohost-admin:
repo: stable
version: 3.3.1
moulinette:
repo: stable
version: 3.3.1
ssowat:
repo: stable
version: 3.3.2
backports:
system:
disks:
vda1: Mounted on /, 146.2GiB (126.7GiB free)
memory:
ram: 484.9MiB (168.2MiB free)
swap: 509.0MiB (190.3MiB free)
nginx:
- nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
- nginx: configuration file /etc/nginx/nginx.conf test is successful
It would be great to be able to make local backups with borg, for instance on an external HDD.
Could it be integrated in this package ? Or is it better to create a dedicated app "borg local" ?
During a test of this app, the install failed because :
W: GPG error: http://cdn-fastly.deb.debian.org/debian stretch-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
was able to solve the issue by manually adding the key with :
gpg --keyserver pgpkeys.mit.edu --recv-keys 7638D0442B90D010
gpg --armor --export 7638D0442B90D010 | apt-key add -
(though the first one took 3 trials before succeeding on my machine ...?)
It could be really helpful to be notified when a backup failed.
Some services send mails when succeed/failed
Hello,
Borg seems to work but when I do
sudo BORG_RSH="ssh -i /root/.ssh/id_borg_ed25519 -oStrictHostKeyChecking=yes " borg list ssh://server@serverb:portSSShserverb/~/backup
I get the following list
auto_conf_07_10_20_18:51 Wed, 2020-10-07 18:51:33 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
auto_data_07_10_20_18:51 Wed, 2020-10-07 18:51:52 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
auto_borg_07_10_20_19:24 Wed, 2020-10-07 19:24:10 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
auto_cesium_07_10_20_19:24 Wed, 2020-10-07 19:24:26 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
auto_element_07_10_20_19:24 Wed, 2020-10-07 19:24:47 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
auto_my_webapp_07_10_20_19:26 Wed, 2020-10-07 19:26:17 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
auto_nextcloud_07_10_20_19:27 Wed, 2020-10-07 19:27:23 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
auto_opensondage_07_10_20_21:15 Wed, 2020-10-07 21:15:17 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
auto_phpmyadmin_07_10_20_21:15 Wed, 2020-10-07 21:15:43 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
auto_searx_07_10_20_21:16 Wed, 2020-10-07 21:16:35 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
auto_synapse_07_10_20_21:17 Wed, 2020-10-07 21:17:24 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
auto_ttrss_07_10_20_22:01 Wed, 2020-10-07 22:01:53 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
auto_vpnclient_07_10_20_22:02 Wed, 2020-10-07 22:02:23 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
auto_wallabag2_07_10_20_22:02 Wed, 2020-10-07 22:02:46 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
auto_wordpress_07_10_20_22:03 Wed, 2020-10-07 22:03:35 [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
it all date from 2020-10-07 (date I installed Borg) and I don't see any updated ARCHIVE_NAME.
Is it normal? or should I see more ARCHIVE_NAME or see them at least updated with a new date?
Or, if it's normal, how can I know it has been updated and it's not the old content only from the time I installed and launch bor backup?
Thank you in advance for your explanations.
I just did a reinstall of the borg app for yunohost and (luckily) realized that the Nextcloud data isn't actually getting backed up! I thought the main point of borg backup for yunohost was being able to do large, frequent data backups?
I think that another case will need to be added to backup-with-borg.j2 that for Nextcloud, it does it twice, once with backup_core_only
set or not set. Probably need to add that to configuration questions during install.
Hello,
I have several wordpress apps install on my server
When i check backup, at the end of it, i saw that some wordpress backup archive are missing
If you have more that 2 wordpress application (or other applications with the same name), when the prune hourly is execute (just after your backup), one of the archive is delete
For example
Backup works for
But when the backup of the wordpress__2 is done the wordpress__1 is prune.
borg_ynh/conf/backup_method.j2
Line 47 in 07114d1
For the moment i disable the prune, i don't know if it's a bug of borg which ignore the __ in the name of archive and how can i modify prune to ignore that
Hi,
it seems to me that the line https://github.com/YunoHost-Apps/borg_ynh/blob/master/conf/backup-with-borg.j2#L18 is incorrect.
The result of the previous line is either 0
or 1
(for me it returns 1
at least) so the comparison fails.
If think this should just be if [ $conf -eq 1 ]
It could be cool to do the backup once (I mean, all the work borg does before sending the backup to the destination) and send it to two (or more) different locations. For example, you can do a backup on a local hard disk and on a distant location.
I tried to setup Borg following the instructions provided, however it keeps failing.
Setup: Yunohost 4.0.8 Buster, tested on 2 servers (same results) : 1 upgraded from Yunohost 3.X and 1 fresh installed 4.X
At first, the install ran into some issues, the package Cython (pip) was missing, I was able to solve this issue by installing it manually, however would it be possible to fix it in the ynh package ?
Here are the details regarding Borg not working using the following command:
$ sudo yunohost app install borgserver
Here is the log from journal :
-- The unit home-yunohost.backup-tmp-auto_rainloop-apps-rainloop-backup-var-www-rainloop.mount has successfully entered the 'dead' state.
DATE server.to.backup backup-with-borg[001]: Custom backup method could not get past the 'backup' step
DATE server.to.backup backup-with-borg[001]: Collecting files to be backed up for wordpress...
DATE server.to.backup backup-with-borg[001]: [++++................] > Loading installation settings...
DATE server.to.backup backup-with-borg[001]: [####++++............] > Backing up the main app directory...
DATE server.to.backup backup-with-borg[001]: [########++..........] > Backing up nginx web server configuration...
DATE server.to.backup backup-with-borg[001]: [##########++........] > Backing up php-fpm configuration...
DATE server.to.backup backup-with-borg[001]: [############++++....] > Backing up the MySQL database...
DATE server.to.backup backup-with-borg[001]: [################++..] > Backing up fail2ban configuration...
DATE server.to.backup backup-with-borg[001]: Creating a backup archive from the collected files...
DATE server.to.backup backup-with-borg[001]: do_known_hosts: hostkeys_foreach failed: No such file or directory
DATE server.to.backup backup-with-borg[001]: do_known_hosts: hostkeys_foreach failed: No such file or directory
DATE server.to.backup backup-with-borg[001]: Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg_app
DATE server.to.backup systemd[002]: home-yunohost.backup-tmp-auto_wordpress-apps-wordpress-backup-var-www-wordpress.mount: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit UNIT has successfully entered the 'dead' state.
DATE server.to.backup systemd[1]: home-yunohost.backup-tmp-auto_wordpress-apps-wordpress-backup-var-www-wordpress.mount: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit home-yunohost.backup-tmp-auto_wordpress-apps-wordpress-backup-var-www-wordpress.mount has successfully entered the 'dead' state.
DATE server.to.backup backup-with-borg[001]: Custom backup method could not get past the 'backup' step
DATE server.to.backup systemd[1]: borg.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit borg.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
DATE server.to.backup systemd[1]: borg.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit borg.service has entered the 'failed' state with result 'exit-code'.
DATE server.to.backup systemd[1]: Failed to start Run backup borg.
-- Subject: A start job for unit borg.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit borg.service has finished with a failure.
The service status :
● borg.service - Run backup borg
Loaded: loaded (/etc/systemd/system/borg.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since DATE UTC; 3min 7s ago
Process: 001 ExecStart=/usr/local/bin/backup-with-borg (code=exited, status=1/FAILURE)
Main PID: 001 (code=exited, status=1/FAILURE)
DATE server.to.backup backup-with-borg[001]: [############++++....] > Backing up the MySQL database...
DATE server.to.backup backup-with-borg[001]: [################++..] > Backing up fail2ban configuration...
DATE server.to.backup backup-with-borg[001]: Creating a backup archive from the collected files...
DATE server.to.backup backup-with-borg[001]: do_known_hosts: hostkeys_foreach failed: No such file or directory
DATE server.to.backup backup-with-borg[001]: do_known_hosts: hostkeys_foreach failed: No such file or directory
DATE server.to.backup backup-with-borg[001]: Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg_app
DATE server.to.backup backup-with-borg[001]: Custom backup method could not get past the 'backup' step
DATE server.to.backup systemd[1]: borg.service: Main process exited, code=exited, status=1/FAILURE
DATE server.to.backup systemd[1]: borg.service: Failed with result 'exit-code'.
DATE server.to.backup systemd[1]: Failed to start Run backup borg.
And the error log from borg :
./05-borg_app: line 31: borg: command not found
./05-borg_app: line 44: borg: command not found
It seems that the borg command isn't working as well, any idea where could be the issue ?
I do get errors in /var/log/backup_borg.err, but not in backup_borg.log. I am expecting to be able to tail that file and see what borg is doing. Right?
Also, it would be good to use the current_date variable to add timestamps to the log files.
Since ynh is meant to make thinks much easier, is Bog a simple backup solution?
I have a 1.4TB server with Debian. I have root access. I have ynh installed. Say I buy another server of 1.4TB, same setup. So, Server A and Server B. I install ynh on this server B and install ynh server. Now I setup the two. So that server A backups to server B, via that Borg and Borg Server panels in ynh.
So far I understood it correctly?
If so, how would a restore look like? Say I want to restore server A as it was a week ago? How is that going to be?
I am struggling to find an easy solution to backup my server. Thanks
Hello,
this is not an issue I think, but more a request for support, but some of this could be enhanced.
With yunohost app setting borg -h
I get this output:
usage: yunohost app setting app key [-h] [-v VALUE] [-d]
Set or get an app setting value
positional arguments:
app App ID
key Key to get/set
optional arguments:
-h, --help show this help message and exit
-v VALUE, --value VALUE
Value to set
-d, --delete Delete the key
But it seems to be impossible to get a list of the keys.
I am currently wondering where borg gets the host information from, meaning which is the path of the SSH-config file it uses. I would like to check why the backup seems to work as per journalctl output, but the remote repo does not contain current backups.
part of ls from remote repo:
drwxr-xr-x 1 user user 0 Nov 17 23:10 auto_borg_17_11_20_23:09/
drwxr-xr-x 1 user user 0 Nov 18 00:00 auto_borg_18_11_20_00:00/
drwxr-xr-x 1 user user 0 Nov 19 00:00 auto_borg_19_11_20_00:00/
drwxr-xr-x 1 user user 0 Nov 20 00:00 auto_borg_20_11_20_00:00/
drwxr-xr-x 1 user user 0 Nov 21 00:00 auto_borg_21_11_20_00:00/
Part of the journalctl output:
Mar 10 00:00:20 mail.example.com backup-with-borg[3832]: ls: cannot access '/etc/yunohost/hooks.d/backup/': No such file or directory
Mar 10 00:00:21 mail.example.com backup-with-borg[3832]: Creating a backup archive from the collected files...
Mar 10 00:00:22 mail.example.com backup-with-borg[3832]: Remote: Debian GNU/Linux 10
Mar 10 00:00:23 mail.example.com backup-with-borg[3832]: A repository already exists at ssh://[email protected]/~/backup.
Mar 10 00:01:38 mail.example.com backup-with-borg[3832]: Backup created
Mar 10 00:01:38 mail.example.com backup-with-borg[3832]: name: auto_data
Mar 10 00:01:38 mail.example.com backup-with-borg[3832]: results:
Mar 10 00:01:38 mail.example.com backup-with-borg[3832]: apps:
Mar 10 00:01:38 mail.example.com backup-with-borg[3832]: system:
Mar 10 00:01:38 mail.example.com backup-with-borg[3832]: data_home: Success
Mar 10 00:01:38 mail.example.com backup-with-borg[3832]: data_mail: Success
This looks good, but no idea where the backup goes to.
It seems that at some point borg switched the repo path from hostname:/volume1/shared/backup/some_name
to hostname:~/backup/some_name
, to the later one it does not have permission to write a backup, but it still seems it does to so so.
No I would like to look at all the config keys of the borg app and don't know how to figure out which keys are available.
Hi,
I want to test manually the backup. From the doc, I tried:
service borg start
But it doesn't work:
Job for borg.service failed because the control process exited with error code.
See "systemctl status borg.service" and "journalctl -xe" for details.
Then I tried: sudo /usr/local/bin/backup-with-borg
And it gives the error:
ls: cannot access '/etc/yunohost/hooks.d/backup/': No such file or directory
Warning: ls: cannot access '/etc/cron.d/yunohost*': No such file or directory
Error: Script execution failed: /etc/yunohost/hooks.d/backup_method/05-borg__2_app
Error: Custom backup method failure on 'backup' step
ls: cannot access '/etc/yunohost/hooks.d/backup/': No such file or directory
Error: Script execution failed: /etc/yunohost/hooks.d/backup_method/05-borg__2_app
Error: Custom backup method failure on 'backup' step
Error: Script execution failed: /etc/yunohost/hooks.d/backup_method/05-borg__2_app
Error: Custom backup method failure on 'backup' step
Error: Script execution failed: /etc/yunohost/hooks.d/backup_method/05-borg__2_app
Error: Custom backup method failure on 'backup' step
Would you have any suggestion? Many thanks!
If the user has manually installed borg with pip you should do
rm /usr/local/bin/borg
I tried to manually start a backup via sudo systemctl start borg.service
I got the log in real time with sudo journalctl -fu borg.service
It failed with :
filesystem.mkdir(self.work_dir, 0o750, parents=True, uid='admin')
File "/usr/lib/python2.7/dist-packages/moulinette/utils/filesystem.py", line 273, in mkdir
raise OSError(errno.EEXIST, m18n.g("folder_exists", path=path))
OSError: [Errno 17] Folder already exists: '/home/yunohost.backup/tmp/auto_data'
Collecting files to be backed up for borg...
Creating a backup archive from the collected files...
Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg_app
Custom backup method could not get past the 'backup' step
Collecting files to be backed up for borgserver...
Creating a backup archive from the collected files...
Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg_app
Custom backup method could not get past the 'backup' step
Traceback (most recent call last):
File "/usr/bin/yunohost", line 218, in <module>
timeout=opts.timeout,
File "/usr/lib/python2.7/dist-packages/moulinette/__init__.py", line 149, in cli
moulinette.run(args, output_as=output_as, password=password, timeout=timeout)
File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/cli.py", line 469, in run
ret = self.actionsmap.process(args, timeout=timeout)
File "/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py", line 588, in process
return func(**arguments)
File "/usr/lib/moulinette/yunohost/backup.py", line 2172, in backup_create
backup_manager = BackupManager(name, description)
File "/usr/lib/moulinette/yunohost/backup.py", line 277, in __init__
self._init_work_dir()
File "/usr/lib/moulinette/yunohost/backup.py", line 348, in _init_work_dir
filesystem.mkdir(self.work_dir, 0o750, parents=True, uid='admin')
File "/usr/lib/python2.7/dist-packages/moulinette/utils/filesystem.py", line 273, in mkdir
raise OSError(errno.EEXIST, m18n.g("folder_exists", path=path))
OSError: [Errno 17] Folder already exists: '/home/yunohost.backup/tmp/auto_dokuwiki'
followed by the same for all installed applications.
I tried to do a normal Yunohost backup and it works, so I don't understand why it fails with Borg app.
Thanks!
If we migrate the backup server, we need to reset servers keys in known_host (for the IP and for the domain).
It could be possible to offer a way to do this simply.
I'm using a NAS to backup my Yunohost. As it is not possible to install Borg on it, I mount the directory before to start backup, then unmount.
I took the code from https://borgbackup.readthedocs.io/en/stable/quickstart.html :
$ sshfs user@hostname:/path/to /path/to
$ borg init /path/to/repo
$ fusermount -u /path/to
It is possible to add this ability to mount a distant storage to your tool ?
Running borg_ynh on a raspberry pi all up-to-date, backups are successfully created. Now I'd like to examine the backup archives by fuse-mounting them at some place. In principle borg can do that, but the output of a borg mount command is presently:
borg mount not available: loading FUSE support failed [ImportError: No module named 'llfuse'
I tried adding llfuse with pip in borg's virtual environment but that fails:
/opt/borg-env/bin/python /opt/borg-env/bin/pip install llfuse
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting llfuse
Downloading llfuse-1.4.0.tar.gz (478 kB)
|████████████████████████████████| 478 kB 4.4 MB/s
ERROR: Command errored out with exit status 2:
command: /opt/borg-env/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d2mlx5w7/llfuse_974b8421bbac4f9490f2788fefef38f5/setup.py'"'"'; file='"'"'/tmp/pip-install-d2mlx5w7/llfuse_974b8421bbac4f9490f2788fefef38f5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-_d4obr0o
cwd: /tmp/pip-install-d2mlx5w7/llfuse_974b8421bbac4f9490f2788fefef38f5/
Complete output (4 lines):
Package fuse was not found in the pkg-config search path.
Perhaps you should add the directory containing `fuse.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fuse' found
----------------------------------------
ERROR: Command errored out with exit status 2: python setup.py egg_info Check the logs for full command output.
I tried adding python3-llfuse debian package and another borgbackup dependency according to debian, and recreating the python environment as in the install script, but that does not solve the issue.
However, if I install debian's borgbackup package and run the mount command with it (that is I invoke /usr/bin/borg instead of borg_yhn’s /usr/local/bin/borg -> /opt/borg-env/bin/borg) then mounting archives works fine. So it seems it's not an issue with a missing fuse kernel module as suggested in the Forum where I first reported the issue. Presently, debian is installing borg 1.1.9 while borg_ynh is pulling 1.1.13, which is maybe a clue. In any case, installing and using debian's borg for mounting the archives is a workaround for the moment.
I’m not familiar enough with python environments to understand what is going wrong and how to resolve that issue with borg_ynh.
I'm using the yunohost.multimedia repository as the main place where I store my personal data (it's easier to mount yunohost.multimedia as an encrypted partition than the whole /home folder), and borg to make my backups. It would be nice to be able to say to borg to save the yunohost.multimedia folder then.
Hello,
I'm wondering how we can check and then change the backup time schedule?
I think I set it up to weekly but I would like to be sure and if I set it up to monthly then I'd like to change it.
How can we do that?
Regards,
Hi,
after some searching I believe that for some reason my user folders cannot be backed up by borg (anymore).
I think all app backups and so on work without a problem (based on listing the backups) but the last backup of my user directory is from 2021-06-25 (when the backups still were not prefixed with a "_").
I am not sure why but it could be that the problem is related to one of the user directories being rather large.
My borg emails begin with
Creating a backup archive from the collected files...
The archive will contain about 340.5KiB of data.
Backup created
name: auto_conf
results:
apps:
system:
conf_ldap: Success
conf_manually_modified_files: Success
conf_ynh_certs: Success
conf_ynh_settings: Success
size: 348708
Creating a backup archive from the collected files...
The archive will contain about 16.8GiB 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 20210921-210443-backup_create' to get help
Collecting files to be backed up for borg...
Loading installation settings...
Declaring files to be backed up...
Backup script completed for borg. (YunoHost will then actually copy those files to the archive).
Creating a backup archive from the collected files...
The archive will contain about 111.1KiB of data.
Backup created
name: auto_borg
results:
apps:
borg: Success
system:
size: 113773
for the full log see here https://paste.yunohost.org/raw/gefipadini for the full log in particular
2021-09-22 01:46:05,053: DEBUG - ++ date +%Y-%m-%d_%H:%M:%S
2021-09-22 01:46:05,067: DEBUG - + sed -e 's/^/[2021-09-22_01:46:05] /'
2021-09-22 07:34:01,690: ERROR - Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg_app
Traceback (most recent call last):
File "/usr/lib/moulinette/yunohost/hook.py", line 307, in hook_callback
path, args=hook_args, chdir=chdir, env=env, raise_on_error=True
File "/usr/lib/moulinette/yunohost/hook.py", line 393, in hook_exec
raise YunohostError("hook_exec_failed", path=path)
yunohost.utils.error.YunohostError: Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg_app
Additionally at the end I get a lot of
Failed to format translated 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)
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)
Failed to format translated string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}, raising error: KeyError('method') (don't panic this is just a warning)
Failed to format translatable string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}', raising error: KeyError('method') (don't panic this is just a warning)
warnings but I am not sure whether they are related.
Just trying to install borg client and have the same message on 4 différents server (some with YNH 3.4.2.4 and 3.5.2.2)
2019-06-16 10:35:24,078: WARNING - _common.sh: line 14: virtualenv: command not found
2019-06-16 10:35:24,080: DEBUG - + '[' '!' -d /opt/borg-env ']'
2019-06-16 10:35:24,081: WARNING - !!
2019-06-16 10:35:24,081: DEBUG - + virtualenv --python=python3 /opt/borg-env
2019-06-16 10:35:24,081: WARNING - borg's script has encountered an error. Its execution was cancelled.
Hi,
thanks a lot for this script, I do hope I'll be able to make it work as expected and finally be able to backup my data.
I am using borgbase.com as a provider (instead of using a "server B" width borgserver_ynh installed). They provide a repo path like [email protected]:repo
.
To be able to instantiate the creation I had to edit this line: and replace the ~/backup/
by ~/repo/
.
It would be great if the user could select its own path (like for the server name etc.) during the installation.
On initialisation, I set my passphrase to
Save of my server !
My last working save is on july 13
Since that, I have errors about passphrase
I tried
sudo yunohost app setting borg passphrase
And it only return
Save
I tried to restore it
sudo yunohost app setting borg passphrase -v "Save of my server !"
But the save still fails.
I tried a command suggested on the forum to get the actually used password
sudo grep "BORG_PASSPHRASE=" /etc/yunohost/hooks.d/backup_method/05-borg_app | cut -d'"' -f2
And it still returns
Save
So I edited the file, and the code only contains BORG_PASSPHRASE="Save"
I replaced it with the real password and now it works.
I don't know how, but my password was truncated.
There were a commit on July 14 containing
export passphrase=$(ynh_app_setting_get $app passphrase)
Maybe this needs some escaping to save the spaces ?
For some time the backup server was down, but I didn't receive any alert email that the backup failed.
I'm using the setting mailalert: errors_only
.
I didn't have this problem some months ago, before the mailalert
setting existed. Wondering if it's related, or not.
These are the logs in /var/log/borg__2/211122_XXXX.err
:
Failed to format translated string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}, raising error: KeyError('method') (don't panic this is just a warning)
Failed to format translatable string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}', raising error: KeyError('method') (don't panic this is just a warning)
Connection closed by remote host. Is borg working on the server?
Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg__2_app
Custom backup method could not get past the 'backup' step
Failed to format translated string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}, raising error: KeyError('method') (don't panic this is just a warning)
Failed to format translatable string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}', raising error: KeyError('method') (don't panic this is just a warning)
Remote: ssh: connect to host backupServer.tld port 22: Network is unreachable
Connection closed by remote host. Is borg working on the server?
Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg__2_app
Custom backup method could not get past the 'backup' step
Failed to format translated string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}, raising error: KeyError('method') (don't panic this is just a warning)
Failed to format translatable string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}', raising error: KeyError('method') (don't panic this is just a warning)
Remote: ssh: connect to host backupServer.tld port 22: Network is unreachable
Connection closed by remote host. Is borg working on the server?
Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg__2_app
Custom backup method could not get past the 'backup' step
Failed to format translated string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}, raising error: KeyError('method') (don't panic this is just a warning)
Failed to format translatable string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}', raising error: KeyError('method') (don't panic this is just a warning)
Remote: ssh: connect to host backupServer.tld port 22: Network is unreachable
Connection closed by remote host. Is borg working on the server?
Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg__2_app
Custom backup method could not get past the 'backup' step
Failed to format translated string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}, raising error: KeyError('method') (don't panic this is just a warning)
Failed to format translatable string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}', raising error: KeyError('method') (don't panic this is just a warning)
Remote: ssh: connect to host backupServer.tld port 22: Network is unreachable
Connection closed by remote host. Is borg working on the server?
Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg__2_app
Custom backup method could not get past the 'backup' step
Failed to format translated string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}, raising error: KeyError('method') (don't panic this is just a warning)
Failed to format translatable string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}', raising error: KeyError('method') (don't panic this is just a warning)
Remote: ssh: connect to host backupServer.tld port 22: Network is unreachable
Connection closed by remote host. Is borg working on the server?
Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg__2_app
Custom backup method could not get past the 'backup' step
Failed to format translated string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}, raising error: KeyError('method') (don't panic this is just a warning)
Failed to format translatable string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}', raising error: KeyError('method') (don't panic this is just a warning)
Remote: ssh: connect to host backupServer.tld port 22: Network is unreachable
Connection closed by remote host. Is borg working on the server?
Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg__2_app
Custom backup method could not get past the 'backup' step
Failed to format translated string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}, raising error: KeyError('method') (don't panic this is just a warning)
Failed to format translatable string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}', raising error: KeyError('method') (don't panic this is just a warning)
Remote: ssh: connect to host backupServer.tld port 22: Network is unreachable
Connection closed by remote host. Is borg working on the server?
Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg__2_app
Custom backup method could not get past the 'backup' step
Failed to format translated string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}, raising error: KeyError('method') (don't panic this is just a warning)
Failed to format translatable string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}', raising error: KeyError('method') (don't panic this is just a warning)
Remote: ssh: connect to host backupServer.tld port 22: Network is unreachable
Connection closed by remote host. Is borg working on the server?
Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg__2_app
Custom backup method could not get past the 'backup' step
It's hightly recommended to make your backup when the service is stopped. Please stop synapse service with this command before to run the backup 'systemctl stop matrix-synapse.service'
Failed to format translated string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}, raising error: KeyError('method') (don't panic this is just a warning)
Failed to format translatable string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}', raising error: KeyError('method') (don't panic this is just a warning)
Connection closed by remote host. Is borg working on the server?
Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg__2_app
Custom backup method could not get past the 'backup' step
These are the logs in /var/log/borg__2/211122_XXXX.log
:
Creating a backup archive from the collected files...
The archive will contain about XX.XXGiB 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 XXXXXXXX-XXXXXX-backup_create' to get help
Collecting files to be backed up for borg__2...
Loading installation settings...
Declaring files to be backed up...
Backup script completed for borg__2. (YunoHost will then actually copy those files to the archive).
Creating a backup archive from the collected files...
The archive will contain about XX.XXKiB 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 XXXXXXXX-XXXXXX-backup_create' to get help
Collecting files to be backed up for APPNAME...
Loading installation settings...
Backing up the main app directory...
Backing up nginx web server configuration...
Backing up the PostgreSQL database...
Backing up fail2ban configuration
Backing up synapse configuration...
Backing up systemd configuration...
Backing up synapse data...
Backing up synapse log...
Backing up synapse hook...
Backup script completed for APPNAME. (YunoHost will then actually copy those files to the archive).
Creating a backup archive from the collected files...
The archive will contain about XX.XXGiB 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 XXXXXXXX-XXXXXX-backup_create' to get help
Hello
Your app is failing on our CI
https://ci-apps.yunohost.org/ci/job/482
Please try to fix this app before Sunday 21th, otherwise it will be set at notworking.
If you need help, don't hesitate to ask on our chat rooms,
Nov 19 11:22:27 ... systemd[1]: Started Run backup borg regularly.
Nov 19 11:22:30 ... systemd[1]: Starting Run backup borg...
then the backup-with-borg routine starts
I restarted to confirm this happens every time:
Nov 19 12:01:37 ... systemd[1]: Started Run backup borg regularly.
Nov 19 12:01:40 ... systemd[1]: Starting Run backup borg...
then the backup-with-borg routine starts
I have it set to backup daily. With two restarts the app will do 3 backups today.
Since (probably the last update) i get in the status mail a lot of lines like
A repository already exists at ssh://yunohost-backups@target-host/~/backup.
But borg list yunohost-backups@target-host:backup::auto_borg-2021-04-23_06:47 contains the backup (before the name did not have the leading "".
The corresponding journal log (sudo journalctl -u borg.service
) reads
-- Logs begin at Fri 2021-04-23 01:23:26 CEST, end at Fri 2021-04-23 09:14:50 CEST. --
Apr 23 06:44:25 myyunohostdomain sudo[18021]: pam_unix(sudo:session): session closed for user root
Apr 23 06:44:26 myyunohostdomain sudo[17334]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost app setting borg apps
Apr 23 06:44:26 myyunohostdomain sudo[17334]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 06:46:31 myyunohostdomain sudo[17334]: pam_unix(sudo:session): session closed for user root
Apr 23 06:46:31 myyunohostdomain sudo[18323]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/ls /etc/yunohost/apps/
Apr 23 06:46:31 myyunohostdomain sudo[18323]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 06:46:31 myyunohostdomain sudo[18323]: pam_unix(sudo:session): session closed for user root
Apr 23 06:46:31 myyunohostdomain sudo[18330]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/borg/scripts/backup
Apr 23 06:46:31 myyunohostdomain sudo[18330]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 06:46:32 myyunohostdomain sudo[18330]: pam_unix(sudo:session): session closed for user root
Apr 23 06:46:32 myyunohostdomain sudo[18335]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_borg --method borg_app --apps borg
Apr 23 06:46:32 myyunohostdomain sudo[18335]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 06:59:57 myyunohostdomain sudo[18335]: pam_unix(sudo:session): session closed for user root
Apr 23 06:59:57 myyunohostdomain sudo[20752]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/gitea/scripts/backup
Apr 23 06:59:57 myyunohostdomain sudo[20752]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 06:59:57 myyunohostdomain sudo[20752]: pam_unix(sudo:session): session closed for user root
Apr 23 06:59:57 myyunohostdomain sudo[20755]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_gitea --method borg_app --apps gitea
Apr 23 06:59:57 myyunohostdomain sudo[20755]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 07:11:07 myyunohostdomain sudo[20755]: pam_unix(sudo:session): session closed for user root
Apr 23 07:11:07 myyunohostdomain sudo[23184]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/mautrix_telegram/scripts/backup
Apr 23 07:11:07 myyunohostdomain sudo[23184]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 07:11:07 myyunohostdomain sudo[23184]: pam_unix(sudo:session): session closed for user root
Apr 23 07:11:08 myyunohostdomain sudo[23188]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_mautrix_telegram --method borg_app --apps mautrix_telegram
Apr 23 07:11:08 myyunohostdomain sudo[23188]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 07:13:42 myyunohostdomain sudo[24279]: root : TTY=unknown ; PWD=/home/yunohost.backup/tmp/auto_mautrix_telegram/apps/mautrix_telegram/backup ; USER=postgres ; COMMAND=/bin/bash -c pg_dump mautrix_telegram
Apr 23 07:13:42 myyunohostdomain sudo[24279]: pam_unix(sudo:session): session opened for user postgres by (uid=0)
Apr 23 07:13:44 myyunohostdomain sudo[24279]: pam_unix(sudo:session): session closed for user postgres
Apr 23 07:17:51 myyunohostdomain sudo[23188]: pam_unix(sudo:session): session closed for user root
Apr 23 07:17:51 myyunohostdomain sudo[24955]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/monitorix/scripts/backup
Apr 23 07:17:51 myyunohostdomain sudo[24955]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 07:17:51 myyunohostdomain sudo[24955]: pam_unix(sudo:session): session closed for user root
Apr 23 07:17:52 myyunohostdomain sudo[24957]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_monitorix --method borg_app --apps monitorix
Apr 23 07:17:52 myyunohostdomain sudo[24957]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 07:22:58 myyunohostdomain sudo[24957]: pam_unix(sudo:session): session closed for user root
Apr 23 07:22:58 myyunohostdomain sudo[26346]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/my_webapp/scripts/backup
Apr 23 07:22:58 myyunohostdomain sudo[26346]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 07:22:58 myyunohostdomain sudo[26346]: pam_unix(sudo:session): session closed for user root
Apr 23 07:22:58 myyunohostdomain sudo[26349]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_my_webapp --method borg_app --apps my_webapp
Apr 23 07:22:58 myyunohostdomain sudo[26349]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 07:27:09 myyunohostdomain sudo[26349]: pam_unix(sudo:session): session closed for user root
Apr 23 07:27:09 myyunohostdomain sudo[27772]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/nextcloud/scripts/backup
Apr 23 07:27:09 myyunohostdomain sudo[27772]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 07:27:09 myyunohostdomain sudo[27772]: pam_unix(sudo:session): session closed for user root
Apr 23 07:27:09 myyunohostdomain sudo[27779]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_nextcloud --method borg_app --apps nextcloud
Apr 23 07:27:09 myyunohostdomain sudo[27779]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 07:59:30 myyunohostdomain sudo[27779]: pam_unix(sudo:session): session closed for user root
Apr 23 07:59:30 myyunohostdomain sudo[580]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/synapse/scripts/backup
Apr 23 07:59:30 myyunohostdomain sudo[580]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 07:59:30 myyunohostdomain sudo[580]: pam_unix(sudo:session): session closed for user root
Apr 23 07:59:31 myyunohostdomain sudo[583]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_synapse --method borg_app --apps synapse
Apr 23 07:59:31 myyunohostdomain sudo[583]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 07:59:49 myyunohostdomain sudo[1121]: root : TTY=unknown ; PWD=/home/yunohost.backup/tmp/auto_synapse/apps/synapse/backup ; USER=postgres ; COMMAND=/bin/bash -c pg_dump matrix_synapse
Apr 23 07:59:49 myyunohostdomain sudo[1121]: pam_unix(sudo:session): session opened for user postgres by (uid=0)
Apr 23 08:01:44 myyunohostdomain sudo[1121]: pam_unix(sudo:session): session closed for user postgres
Apr 23 08:21:33 myyunohostdomain sudo[583]: pam_unix(sudo:session): session closed for user root
Apr 23 08:21:34 myyunohostdomain sudo[5894]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/ttrss/scripts/backup
Apr 23 08:21:34 myyunohostdomain sudo[5894]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 08:21:34 myyunohostdomain sudo[5894]: pam_unix(sudo:session): session closed for user root
Apr 23 08:21:34 myyunohostdomain sudo[5897]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_ttrss --method borg_app --apps ttrss
Apr 23 08:21:34 myyunohostdomain sudo[5897]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 08:28:15 myyunohostdomain sudo[5897]: pam_unix(sudo:session): session closed for user root
Apr 23 08:28:16 myyunohostdomain sudo[7410]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/unattended_upgrades/scripts/backup
Apr 23 08:28:16 myyunohostdomain sudo[7410]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 08:28:16 myyunohostdomain sudo[7410]: pam_unix(sudo:session): session closed for user root
Apr 23 08:28:16 myyunohostdomain sudo[7412]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_unattended_upgrades --method borg_app --apps unattended_upgrades
Apr 23 08:28:16 myyunohostdomain sudo[7412]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 08:35:36 myyunohostdomain sudo[7412]: pam_unix(sudo:session): session closed for user root
Apr 23 08:35:36 myyunohostdomain sudo[9009]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/wallabag2/scripts/backup
Apr 23 08:35:36 myyunohostdomain sudo[9009]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 08:35:36 myyunohostdomain sudo[9009]: pam_unix(sudo:session): session closed for user root
Apr 23 08:35:36 myyunohostdomain sudo[9012]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_wallabag2 --method borg_app --apps wallabag2
Apr 23 08:35:36 myyunohostdomain sudo[9012]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 08:43:34 myyunohostdomain sudo[9012]: pam_unix(sudo:session): session closed for user root
Apr 23 08:43:35 myyunohostdomain sudo[11024]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost app setting borg repository
Apr 23 08:43:35 myyunohostdomain sudo[11024]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 23 08:43:41 myyunohostdomain sudo[11024]: pam_unix(sudo:session): session closed for user root
Apr 23 08:43:42 myyunohostdomain sudo[15379]: pam_unix(sudo:session): session closed for user root
Apr 23 08:43:42 myyunohostdomain systemd[1]: borg.service: Main process exited, code=exited, status=1/FAILURE
Apr 23 08:43:42 myyunohostdomain systemd[1]: borg.service: Failed with result 'exit-code'.
Apr 23 08:43:42 myyunohostdomain systemd[1]: Failed to start Run backup borg.
Sometimes, the borg create
command fails in the backup_method script. I don't get any error log in /var/log/borg/
, and I miss clues why the error occurs.
NB: I use a distant borg repository which is not a Yunohost server (I tweak the value of the repository
variable).
yunohost app info $app_id
Run systemctl start borg
and ensure borg create fails I guess ¯_ (ツ)_/¯
The error should be logged in /var/log/borg/...
In lines invoking borg create and borg prune (here, here and here), I wonder why we redirect the output to /dev/null
.
Cannot 2>&1 | log_with_timestamp
be enough?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.