Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BorgBackup not possible to IPv6-only remote host #2833

Open
NickBouwhuis opened this issue Aug 18, 2023 · 7 comments
Open

BorgBackup not possible to IPv6-only remote host #2833

NickBouwhuis opened this issue Aug 18, 2023 · 7 comments
Labels
question This issue is a question related to installation stale

Comments

@NickBouwhuis
Copy link

Playbook Configuration:

My vars.yml file looks like this:

backup_borg_enabled: true
backup_borg_location_repositories:
 - ssh://[email protected]/data/borg/matrix
backup_borg_storage_encryption_passphrase: "xxx"
backup_borg_ssh_key_private: |
  -----BEGIN OPENSSH PRIVATE KEY-----
  xxx
  -----END OPENSSH PRIVATE KEY-----

Matrix Server:

  • OS: debian bookworm
  • Architecture amd64

Problem description:
I have setup BorgBackup according to the documentation in this repo.

I have prepared a borg repo with borg init --encryption=repokey /data/borg/matrix

I have made an ssh key, configured it on my NAS and made sure I can ssh to the borg user (over IPv6)

When I configure everything and run a backup with sudo systemctl start matrix-backup-borg, I get the following result:

nick@matrix01:~$ sudo systemctl start matrix-backup-borg
Job for matrix-backup-borg.service failed because the control process exited with error code.
See "systemctl status matrix-backup-borg.service" and "journalctl -xeu matrix-backup-borg.service" for details.
nick@matrix01:~$ sudo systemctl status matrix-backup-borg
× matrix-backup-borg.service - Borg Backup
     Loaded: loaded (/etc/systemd/system/matrix-backup-borg.service; disabled; preset: enabled)
     Active: failed (Result: exit-code) since Fri 2023-08-18 19:58:34 UTC; 33s ago
TriggeredBy: ● matrix-backup-borg.timer
    Process: 47808 ExecStartPre=/usr/bin/env sh -c /usr/bin/env docker kill matrix-backup-borg 2>/dev/null || true (code=exited, status=0/SUCCESS)
    Process: 47815 ExecStartPre=/usr/bin/env sh -c /usr/bin/env docker rm matrix-backup-borg 2>/dev/null || true (code=exited, status=0/SUCCESS)
    Process: 47823 ExecStartPre=/usr/bin/env docker run --rm --name matrix-backup-borg --log-driver=none --cap-drop=ALL --read-only --user=999:1001 --network=matrix --t>
    Process: 47955 ExecStart=/usr/bin/env docker run --rm --name matrix-backup-borg --log-driver=none --cap-drop=ALL --cap-add=CAP_DAC_OVERRIDE --read-only --network=ma>
   Main PID: 47955 (code=exited, status=1/FAILURE)
        CPU: 292ms

Aug 18 19:58:34 matrix01 matrix-backup-borg[47955]: summary:
Aug 18 19:58:34 matrix01 matrix-backup-borg[47955]: /etc/borgmatic.d/config.yaml: An error occurred
Aug 18 19:58:34 matrix01 matrix-backup-borg[47955]: ssh://[email protected]/data/borg/matrix: Error running actions for repository
Aug 18 19:58:34 matrix01 matrix-backup-borg[47955]: Remote: ssh: connect to host hostname.to.ipv6.address.of.my.nas port 22: Address not available
Aug 18 19:58:34 matrix01 matrix-backup-borg[47955]: Connection closed by remote host. Is borg working on the server?
Aug 18 19:58:34 matrix01 matrix-backup-borg[47955]: Command 'borg create --exclude-from /tmp/tmpa4uxejx9 --compression lz4 --one-file-system --read-special ssh://borg@h>
Aug 18 19:58:34 matrix01 matrix-backup-borg[47955]: Need some help? https://torsion.org/borgmatic/#issues
Aug 18 19:58:34 matrix01 systemd[1]: matrix-backup-borg.service: Main process exited, code=exited, status=1/FAILURE
Aug 18 19:58:34 matrix01 systemd[1]: matrix-backup-borg.service: Failed with result 'exit-code'.
Aug 18 19:58:34 matrix01 systemd[1]: Failed to start matrix-backup-borg.service - Borg Backup.

This leads me to believe that the container that runs Borg is not setup to use IPv6. What would be the correct way to tackle this?

@aine-etke
Copy link
Collaborator

Correct way would be sending MR to the gitlab.com/etke.cc/borgmatic ;)

@NickBouwhuis
Copy link
Author

Hehe. Fair enough.

Any idea what could be causing this error?

@aine-etke
Copy link
Collaborator

Unfortunately, no. We don't have any IPv6-only hosts, so never encountered that problem

@luixxiul luixxiul added question This issue is a question related to installation upstream This issue is related to an upstream project labels Nov 2, 2024
@nolith
Copy link

nolith commented Nov 11, 2024

I have an ipv6 host as well, there is no ipv6 connectivity inside docker so every hostname that resolves to ipv6 only fail with network unreachable

@aine-etke
Copy link
Collaborator

Well, in that case the issue could be closed, as it is unrelated to Borg, and more about docker itself

@nolith
Copy link

nolith commented Nov 12, 2024

Well, in that case the issue could be closed, as it is unrelated to Borg, and more about docker itself

Is not a borg problem, but it is a matrix-docker-ansible-deploy problem.

In #3764 I'm listing some software in matrix-docker-ansible-deploy that does not work correctly on ipv6-only exposed homeserver.

@luixxiul luixxiul removed the upstream This issue is related to an upstream project label Nov 12, 2024
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days. To exempt the issue from being marked as stale again due to inactivity, add "confirmed" label.

@github-actions github-actions bot added the stale label Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This issue is a question related to installation stale
Projects
None yet
Development

No branches or pull requests

4 participants