Blogs Engineering

Making -no-xattr Actually Skip Extended Attributes in Plakar Backups

Artigo em inglês. Plakar's -no-xattr flag never reached the filesystem importer, so FUSE mounts like /etc/pve failed to back up. A one-line fix plus a regression test.

GoPlakarKorp/plakarbackupCLI flagsFUSE

A flag that was parsed but never passed along, and a test that proves it now reaches the importer.

Resposta curta

Plakar's backup -no-xattr flag was accepted but never passed to the importer, so Plakar still read extended attributes. On filesystems that don't support them, such as Proxmox's FUSE-mounted /etc/pve, files failed with "operation not supported". The fix copies the flag into the importer options and adds a test that checks it arrives. It was merged as PR #2327 and closed issue #2045.

The problem

Plakar is an open-source backup tool written in Go. Issue #2045 showed a backup of a Proxmox server's config directory:

plakar at @s3-ik backup -no-xattr -tag pve /etc/pve
...
        import: nodes=273/273, objects=1659/1659, errors=83
...
✘ /etc/pve/notifications.cfg: operation not supported

The user had already passed -no-xattr, and the errors still appeared.

The fix

importerOpts := ctx.ImporterOpts()
importerOpts.Excludes = cmd.Excludes
importerOpts.NoXattr = cmd.NoXattr

The regression test registers a probe importer that records the NoXattr option it receives, then runs a backup with and without -no-xattr:

require.Equal(t, tc.want, xattrProbeNoXattr.Load(),
    "-no-xattr must reach the importer so it does not read extended attributes")

By the numbers

  • Repository: PlakarKorp/plakar, 2,102 stars (Nov 3, 2026), Go, ISC
  • Files changed: 2 (1 source file, 1 test file)
  • Lines: +45 / -0
  • Commits: 1
  • Opened: Aug 21, 2026. Merged: Sep 22, 2026. Time to merge: 31 days, 19 hours
  • Review: 3 approvals

How the review went

Three reviewers approved the change over about three weeks, the last two with "lgtm" and "LGTM thx." It was merged on Sep 22.

Perguntas frequentes

What did the bug affect?

Any backup where -no-xattr was meant to avoid reading extended attributes. The issue's example was Proxmox's /etc/pve.

Where can I read more?

See the pull request and the original issue.

O objetivo

The production change is one line. The test is what makes it last, because it fails the moment the flag stops reaching the importer again.

Executar o ciclo

Transforme sinais de produção em correções revisadas.

Comece um teste grátis e veja como a Prilog conecta incidentes reais a pull requests no nível do código.