Skip to content

funny issue with borg update ? #575

Closed

Description

@darkfritz2

Description

Hello,
i don't know if it's intentional or if i made a mistake but i have 2 clients: one on almalinux 9 and another on ubuntu 26.
the one on almalinux 9 i have the Agent Poll Interval in my queue (literally spamming) every 30 seconds but the one with ubuntu 26 is silent.

maybe i've done something wrong ?

Steps to Reproduce

just install agent on ubuntu 26 and almalinux 9 and see what the webui does.

Installation Type

Bare metal (Ubuntu)

BBS Version

2.101.0

Agent Version (if applicable)

No response

Agent OS (if applicable)

None

Relevant Logs

Activity

  1. added
    bug
    on Nov 13, 2026
  2. darkfritz2 commented on Nov 16, 2026

    @darkfritz2
    Author

    i found out what the issue was.
    in almalinux 9, borgbackup is shipped from EPEL 9 which only has version 1.2.9. and the agent couldnt update when /tmp is noexec.

    suggested fix: _install_borg_binary() should run its version/functional test with a temp
    dir next to the target binary (tempfile.mkdtemp(dir=os.path.dirname(binary_path))
    passed via env=), not inherited $TMPDIR. Or retry once with a sane
    TMPDIR and surface a clear "/tmp is mounted noexec" message.

    workaround:

    sudo mkdir -p /var/lib/bbs-agent/tmp
    sudo mkdir -p /etc/systemd/system/bbs-agent.service.d
    sudo tee /etc/systemd/system/bbs-agent.service.d/tmpdir.conf >/dev/null <<'EOF'
    [Service]
    Environment=TMPDIR=/var/lib/bbs-agent/tmp
    EOF
    sudo chmod 755 /var/lib/bbs-agent/tmp
    sudo systemctl daemon-reload
    sudo systemctl restart bbs-agent

    systemctl show bbs-agent -p Environment
    findmnt -no TARGET,OPTIONS -T /var/lib/bbs-agent/tmp
    sudo env TMPDIR=/var/lib/bbs-agent/tmp /usr/local/bin/borg --version

    cd /root
    curl -fLO https://github.com/borgbackup/borg/releases/download/1.4.5/borg-linux-glibc231-x86_64
    chmod +x borg-linux-glibc231-x86_64
    sudo install -m 755 borg-linux-glibc231-x86_64 /usr/local/bin/borg
    sudo env TMPDIR=/var/lib/bbs-agent/tmp /usr/local/bin/borg --version

  3. added a commit that references this issue on Nov 17, 2026
  4. marcpope commented on Nov 17, 2026

    @marcpope
    Owner

    Thanks @darkfritz2 for tracking it down. The agent now checks at startup whether its temp dir is mounted noexec and, if so, points TMPDIR at /etc/bbs-agent/tmp before anything runs borg. That covers the binary test during the update and every later borg run, since borg's bundled binary unpacks itself under TMPDIR each time. Tested against a noexec tmpfs: borg fails to extract there and runs from the redirected dir.

    The repeated job in the queue was the server queuing the update again after each failed test; that stops once the update goes through. Your systemd drop-in keeps working and isn't needed after the agent update. In the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions