Giter VIP home page Giter VIP logo

Comments (5)

KvL159 avatar KvL159 commented on July 18, 2024 1

I am still not able to run Borg on any of my servers, any hint where could be the issue ?

from borg_ynh.

KvL159 avatar KvL159 commented on July 18, 2024

Here is some update on the issue :

$ borg
-bash: borg: command not found

I then tried to run the script manually :
$ cd /usr/local/bin

$ backup-with-borg
ls: cannot access '/etc/yunohost/hooks.d/backup/': No such file or directory
Info: Creating a backup archive from the collected files...
Warning: do_known_hosts: hostkeys_foreach failed: No such file or directory
Warning: do_known_hosts: hostkeys_foreach failed: No such file or directory
Error: Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg_app
Error: Custom backup method could not get past the 'backup' step

It seems related to this issue, however I'm not sure if it was solved : https://forum.yunohost.org/t/borg-backup-sauvegarde-locale/12496/3

@zamentur
Thank you for your help

from borg_ynh.

Thatoo avatar Thatoo commented on July 18, 2024

I get the same error as you do

nov. 04 22:39:14 xx backup-with-borg[25707]: Échec de l’exécution du script : /etc/yunohost/hooks.d/backup_method/05-borg_app
nov. 04 22:39:14 xx backup-with-borg[25707]: Échec de la méthode de sauvegarde personnalisée à l’étape 'backup'
nov. 04 22:39:14 xx systemd[1]: borg.service: Main process exited, code=exited, status=1/FAILURE
nov. 04 22:39:14 xx systemd[1]: borg.service: Failed with result 'exit-code'.
nov. 04 22:39:14 x systemd[1]: Failed to start Run backup borg.

It seems like borg is not very easy to handle...

from borg_ynh.

BCITMike avatar BCITMike commented on July 18, 2024

borg init: error: argument REPOSITORY: Invalid location format: "ssh://[email protected]:repo/~/backup"

There's at least two problems. First, SSH connection was failing, even though the script points to /root/.ssh/id_borg_ed25519. Got around that by adding to /root/.ssh/config:

      Host *.repo.borgbase.com
     IdentityFile ~/.ssh/id_borg_ed25519

That could just be from testing from command line and not from script and missing the variables, though. Won't hurt to add.

Second, I was getting borg init errors, and needed to remove the "ssh://" at the start of the repo.
Then I was getting this error: [2020-12-01_03:36:24] Repository path not allowed: /srv/repos/ok5v04j1/repo/~/backup

borg list [email protected]:repo prints the files.
borg list [email protected]:repo/~/backup gives:
Repository path not allowed: /srv/repos/ok5v04j1/repo/~/backup

So from my notes, I seem to have removed the ~/backup from the repo path as well, and now when I run the backup, the error log contains:

[2020-12-01_03:44:52] A repository already exists at [email protected]:repo.

IIRC, this always happened and can be ignored. But for the first time since upgrading to Debian 10, borgbase shows an updated modified time, so the repo is currently getting written to.

Change: borg_ynh/conf/backup_method.j2 (in repo) or 05-borg_app (on your server)
repo=ssh://{{ ssh_user }}@{{ server }}/~/backup
to:
repo={{ ssh_user }}@{{ server }}

from borg_ynh.

BCITMike avatar BCITMike commented on July 18, 2024

@KvL159 @Thatoo
ls: cannot access '/etc/yunohost/hooks.d/backup/': No such file or directory

Fix this with:
mkdir -p /etc/yunohost/hooks.d/backup

Then, to fix backup, do you recall if you previously edited the repo to remove the "ssh://" and the "/~/backup"?

See my comment above.

from borg_ynh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.