Need help with borg setup

Hardware: AMD64
YunoHost version: 4.3.6.3 (stable).
I have access to my server : Yes
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes
If yes, please explain: it’s behind a VPN exactly like: Homemade WireGuard VPN on a VPS server

Description:
Hi there, I need a little help with setting-up Borg. Here is what I did.

I’ve bought a storage space from Hetzner, installed the Borg app via YH admin, entered the details. But what’s next? I feel like it is doing nothing at all. Then also I found a lot of tutorials which some of them are outdated or just way convoluted and seem not that easy as step 1 this, step 2 that, step 3 done.

Does someone have experience with Hetzner and Borg and could that someone please explain to me what to do and how to test things?

I also never found any step where to put or find the ssh keys?! i might be missing something here, their fore help is much appreciated!

Thanks!

I never used a distant borg backup (yet, because I have a too small upload) but here is what I understood :

For distant backup, you need a borg server on the distant server (which will, I think, install borg and open an ssh access for your client).

Here are the steps :

  1. Install borg app on your server
  2. Tho path for the backup can be tricky
    2.1. For a local backup, put the path of a local folder where the backup will be done (to avoid problems I had, do not use the same folder for multiple backups, they will not be able to run simultaneousely)
    2.2. For a distant backup, choose whatever username you want if the distant server is one you manage (one not already existing user), if you are using a borg service, it should inform you what to use. For the path, use whatever you want too, or what the provides tell you to use.
  3. Note everything the installation tells you (there will be a ssh key for the distant server)
  4. Install borgserver on the DISTANT server
    4.1. Inform the user you decided, and the ssh key that was generated
    4.2. On a borg service, I have no idea, there should be something like this on their side for the ssh key :person_shrugging:
  5. Wait patiently for the first backup
    5.1. If you configured the client to only inform you of errors, go check on the distant server that there is something, using borg info /path/to/repo (not 100% sure)
  6. Enjoy
2 Likes

Ahh okay, thanks!

It is running now with an ETA of roughly 4 months :sweat_smile:

Oh, YEET my ssh connection was interrupted, I tried the screen command but nope not worky.

What was that command again to get the session back? Google doesn’t really help much.

I am not sure you can retreive the session, but the process might still be wosking.
I remember that the first backup can be REALLY long (can be days), after that there are only the differencs that are sent, which in my case is a matter of minutes.

You can list the running processes with ps -ef, or chick the logs (I have no idea if anything is logged and where)

1 Like

Borg says

journalctl: 
  - -- Logs begin at Fri 2022-08-05 19:08:19 CEST, end at Thu 2022-08-11 07:20:16 CEST. --
  - Aug 08 00:04:17 sudo[10911]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:04:17 sudo[11387]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/wordpress/scripts/backup
  - Aug 08 00:04:17 sudo[11387]: pam_unix(sudo:session): session opened for user root by (uid=0)
  - Aug 08 00:04:17 sudo[11387]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:04:17 sudo[11389]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_wordpress --method borg_app --apps wordpress
  - Aug 08 00:04:17 sudo[11389]: pam_unix(sudo:session): session opened for user root by (uid=0)
  - Aug 08 00:04:38 sudo[11389]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:04:38 sudo[12074]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/wordpress__10/scripts/backup
  - Aug 08 00:04:38 sudo[12074]: pam_unix(sudo:session): session opened for user root by (uid=0)
  - Aug 08 00:04:38 sudo[12074]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:04:38 sudo[12076]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_wordpress__10 --method borg_app --apps wordpress__10
  - Aug 08 00:04:38 sudo[12076]: pam_unix(sudo:session): session opened for user root by (uid=0)
  - Aug 08 00:04:45 sudo[12076]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:04:45 sudo[12733]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/wordpress__11/scripts/backup
  - Aug 08 00:04:45 sudo[12733]: pam_unix(sudo:session): session opened for user root by (uid=0)
  - Aug 08 00:04:45 sudo[12733]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:04:45 sudo[12735]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_wordpress__11 --method borg_app --apps wordpress__11
  - Aug 08 00:04:45 sudo[12735]: pam_unix(sudo:session): session opened for user root by (uid=0)
  - Aug 08 00:04:50 sudo[12735]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:04:50 sudo[13392]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/wordpress__2/scripts/backup
  - Aug 08 00:04:50 sudo[13392]: pam_unix(sudo:session): session opened for user root by (uid=0)
  - Aug 08 00:04:50 sudo[13392]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:04:50 sudo[13394]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_wordpress__2 --method borg_app --apps wordpress__2
  - Aug 08 00:04:50 sudo[13394]: pam_unix(sudo:session): session opened for user root by (uid=0)
  - Aug 08 00:04:57 sudo[13394]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:04:57 sudo[14052]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/wordpress__4/scripts/backup
  - Aug 08 00:04:57 sudo[14052]: pam_unix(sudo:session): session opened for user root by (uid=0)
  - Aug 08 00:04:57 sudo[14052]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:04:57 sudo[14054]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_wordpress__4 --method borg_app --apps wordpress__4
  - Aug 08 00:04:57 sudo[14054]: pam_unix(sudo:session): session opened for user root by (uid=0)
  - Aug 08 00:05:05 sudo[14054]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:05:05 sudo[14718]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/test ! -f /etc/yunohost/apps/wordpress__5/scripts/backup
  - Aug 08 00:05:05 sudo[14718]: pam_unix(sudo:session): session opened for user root by (uid=0)
  - Aug 08 00:05:05 sudo[14718]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:05:05 sudo[14720]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_wordpress__5 --method borg_app --apps wordpress__5
  - Aug 08 00:05:05 sudo[14720]: pam_unix(sudo:session): session opened for user root by (uid=0)
  - Aug 08 00:05:11 sudo[14720]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:05:11 sudo[15381]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost app setting borg repository
  - Aug 08 00:05:11 sudo[15381]: pam_unix(sudo:session): session opened for user root by (uid=0)
  - Aug 08 00:05:11 sudo[15381]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:05:11 sudo[15383]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost app setting borg mailalert
  - Aug 08 00:05:11 sudo[15383]: pam_unix(sudo:session): session opened for user root by (uid=0)
  - Aug 08 00:05:11 sudo[15383]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:05:11 sudo[15385]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost app setting borg state -v failed
  - Aug 08 00:05:11 sudo[15385]: pam_unix(sudo:session): session opened for user root by (uid=0)
  - Aug 08 00:05:11 sudo[15385]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:05:11 sudo[26634]: pam_unix(sudo:session): session closed for user root
  - Aug 08 00:05:11 systemd[1]: borg.service: Main process exited, code=exited, status=1/FAILURE
  - Aug 08 00:05:11 systemd[1]: borg.service: Failed with result 'exit-code'.
  - Aug 08 00:05:11 systemd[1]: Failed to start Run backup borg.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.