maddin
(M. Dro_ste)
July 1, 2026, 7:09am
1
NethServer Version: ns8
Module: Backup
Hi,
I’ve got a problem with one backup job. It is for backing up three applications: Loki, Traefik and DNSmasq. The first two work fine, and the third, DNSmasq, did as well until today.
The error:
dnsmasq2: starting backup 4 at Wed Jul 1 08:48:54 2026
Repository is present at path dc336d94-e81f-58ea-b923-b12bd78229c2/dnsmasq/799e8565-f65f-4c60-9cff-2d3dfc91ff55
[ERROR] restic backup failed: Popen.init() got an unexpected keyword argument ‘check’
dnsmasq2: backup 4 failed (exit code 1)
Does anyone have any idea what I’ve done wrong?
Thank you for any suggestions.
maddin
pagaille
(Matthieu Gaillet)
July 1, 2026, 9:34am
2
Hi,
Latest core.
I recently added a crowdsec module then added it to an existing backup :
When lauched from the UI, it fails :
crowdsec2: starting backup 8 at Wed Jul 1 11:23:00 2026
Repository is present at path ce9fb2b8-d342-5aaa-b538-ada6b54553f7/crowdsec/4274927c-0a9c-4efb-b1c9-84ada41e2048
[ERROR] restic backup failed: Popen.__init__() got an unexpected keyword argument 'check'
crowdsec2: backup 8 failed (exit code 1)
When launched manually it succeeds :
[root@ns8 ~]# runagent -m node run-backup --backup 8
(...)
crowdsec2: starting backup 8 at Wed Jul 1 11:16:09 2026
Repository is present at path ce9fb2b8-d342-5aaa-b538-ada6b54553f7/crowdsec/4274927c-0a9c-4efb-b1c9-84ada41e2048
no parent snapshot found, will read all files
Files: 19 new, 0 changed, 0 unmodified
Dirs: 4 new, 0 changed, 0 unmodified
Added to the repository: 41.857 MiB (6.923 MiB stored)
processed 19 files, 41.838 MiB in 0:07
snapshot 84222e41 saved
Applying Policy: keep 30 latest snapshots
keep 1 snapshots:
ID Time Host Tags Reasons Paths Size
---------------------------------------------------------------------------------------------------------------------------------
84222e41 2026-07-01 09:16:12 ns8 last snapshot /srv/state/environment 41.838 MiB
/srv/state/secrets/bouncer_keys_firewall.secret
/srv/volumes/data
---------------------------------------------------------------------------------------------------------------------------------
1 snapshots
crowdsec2: backup 8 completed
(...)
Backup 8 completed successfully
What’s wrong ?
Txs !
stephdl
(Stéphane de Labrusse)
July 1, 2026, 10:17am
3
not reproducible here on my system
1 Like
giacomo
(Giacomo Sanchietti)
July 1, 2026, 12:45pm
4
It seems the same error reported here: Backup Error dnsmasq to SMB-Share
Can you past the full task log extract?
2 Likes
davidep
(Davide Principi)
July 1, 2026, 2:27pm
5
It looks like a programming error!
When backup runs under UI a different execution path is chosen.
2 Likes
stephdl
(Stéphane de Labrusse)
July 1, 2026, 3:06pm
6
huw why only for rootfull module therefore ?
1 Like
mrmarkuz
(Markus Neuberger)
July 1, 2026, 3:07pm
7
I can reproduce with crowdsec and dnsmasq. It seems only rootfull apps are affected.
To me it seems the error is triggered by following line: (after commenting out there’s no error anymore)
agent_progress_callback = agent.get_progress_callback(1, 95)
def backup_progress_callback(omessage):
global agent_progress_callback
if omessage['message_type'] == 'status':
fpercent = float(omessage['percent_done'])
agent_progress_callback(int(fpercent * 100))
try:
# Run the backup
if os.getenv('AGENT_TASK_ID'):
agent.run_restic(rdb, repository, repopath, podman_args, ["backup", "--json"] + backup_args, progress_callback=backup_progress_callback, check=True)
else:
agent.run_restic(rdb, repository, repopath, podman_args, ["backup", "--no-scan"] + backup_args).check_returncode()
except Exception as ex:
print(f"[ERROR] restic backup failed: {ex}", file=sys.stderr)
sys.exit(1)
try:
subprocess.run(["module-cleanup-state"] + sys.argv[1:], check=True)
except FileNotFoundError:
pass
Which leads to the following subprocess.popen command:
print("restic", *restic_args, file=sys.stderr)
kwargs.setdefault('encoding', 'utf-8')
kwargs.setdefault('env', penv)
kwargs.setdefault('stdout', sys.stdout)
kwargs.setdefault('stderr', sys.stderr)
if progress_callback and '--json' in restic_args:
kwargs['stdout'] = subprocess.PIPE
kwargs.setdefault('errors', 'replace')
kwargs.setdefault('text', True)
with subprocess.Popen(podman_cmd, **kwargs) as prestic:
while True:
line = prestic.stdout.readline()
if not line:
break
try:
progress_callback(json.loads(line))
except Exception as ex:
print(SD_DEBUG + "Error decoding Restic status message", ex, file=kwargs['stderr'])
else:
prestic = subprocess.run(podman_cmd, **kwargs)
4 Likes
pagaille
(Matthieu Gaillet)
July 1, 2026, 3:41pm
8
Is still needed ? The log is quite big, too big to be pasted here.
Txs for looking at this.
1 Like
maddin
(M. Dro_ste)
July 1, 2026, 4:48pm
9
Hi All,
sry, should have added that I’ve updated the core today!
And as I read, my log isn’t needed anymore!?
Thx you all
maddin
davidep
(Davide Principi)
July 2, 2026, 12:28pm
10
3 Likes