YunoHost-Apps / borg_ynh

An experimental Borg implementation for YunoHost
https://www.borgbackup.org/
GNU Affero General Public License v3.0
19 stars 23 forks source link

How to manually start a backup #28

Closed MaximeMaW closed 3 years ago

MaximeMaW commented 5 years ago

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!

keomabrun commented 5 years ago

Tried it on my side and I got the same systemctl error. Here here the output of sudo systemctl status borg__2 (for some reason the service is called borg__2 and not just borg)

● borg__2.service - Run backup borg__2
   Loaded: loaded (/etc/systemd/system/borg__2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2019-03-04 00:00:35 UTC; 19h ago
  Process: 12098 ExecStart=/usr/local/bin/backup-with-borg__2 (code=exited, status=1/FAILURE)
 Main PID: 12098 (code=exited, status=1/FAILURE)
      CPU: 17.557s

Mar 04 00:00:32 chif.fr sudo[12956]: pam_unix(sudo:session): session closed for user root
Mar 04 00:00:32 chif.fr sudo[13053]:     root : TTY=unknown ; PWD=/home/yunohost.backup/tmp/auto_nextcloud/apps/nextcloud/backup ; USER=root ; COMMAND
Mar 04 00:00:32 chif.fr sudo[13053]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 04 00:00:32 chif.fr sudo[13053]: pam_unix(sudo:session): session closed for user root
Mar 04 00:00:35 chif.fr backup-with-borg__2[12098]: Script execution failed: /etc/yunohost/hooks.d/backup_method/05-borg__2_app
Mar 04 00:00:35 chif.fr backup-with-borg__2[12098]: Custom backup method failure on 'backup' step
Mar 04 00:00:35 chif.fr systemd[1]: borg__2.service: Main process exited, code=exited, status=1/FAILURE
Mar 04 00:00:35 chif.fr systemd[1]: Failed to start Run backup borg__2.
Mar 04 00:00:35 chif.fr systemd[1]: borg__2.service: Unit entered failed state.
Mar 04 00:00:35 chif.fr systemd[1]: borg__2.service: Failed with result 'exit-code'.
zamentur commented 5 years ago

Is there specific things you have put when you answer install questions ?

Gredin67 commented 4 years ago

@keomabrun @MaximeMaW I had some similar issue after reinstalling several times both the backup app and the server app. Following @zamentur ideas, I solved it by removing both apps, then erasing both folder: /opt/borg-env/ /usr/local/bin/borg And then reinstalling both apps.

Can you confirm?

MaximeMaW commented 3 years ago

Hello. Sorry for not responding, I stopped using borg backup, due to this problem. I won't be able to follow on this issue. Best.