Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Synology @eaDir backup fails after 0.19 upgrade despite exclude rules #21899

Description

@u1156

Output of restic version

restic 0.19.0 compiled with go1.26.4 on linux/amd64

What backend/service did you use to store the repository?

Backblaze B2

Problem description / Steps to reproduce

I run restic in Docker on a Synology NAS.

The backup source inside the container is /source.

The backup started failing after upgrading restic to the 0.19.x series. The same backup job worked before the upgrade.

The command is:

docker-compose run --rm restic backup \
  -v \
  /source \
  --exclude-file=/source/docker/restic/excludes.txt \
  --skip-if-unchanged \
  --exclude-caches \
  --tag synology

The source contains Synology metadata directories named @eaDir.
The exclude file contains explicit rules for those directories:

**/@eaDir
**/@eaDir/**
/source/data/@eaDir
/source/data/@eaDir/**
/source/**/@eaDir
/source/**/@eaDir/**

The exclude file is visible inside the container at:

/source/docker/restic/excludes.txt

Even with these exclude rules, restic still reports an error for /source/data/@eaDir.

Relevant output:

open repository
using parent snapshot 50f625f5
load index files
start scan on [/source]
start backup on [/source]
error: /source/data/@eaDir: name "@eaDir" is not greater than last name "@eaDir"
scan finished in 175.846s: 351902 files, 375.466 GiB

Files:           1 new,     1 changed, 351900 unmodified
Dirs:            2 new,     3 changed, 37592 unmodified
Data Blobs:      2 new
Tree Blobs:      5 new
Added to the repository: 6.610 KiB (3.102 KiB stored)

processed 351902 files, 375.466 GiB in 3:57
snapshot ab0a35a6 saved
Warning: at least one source file could not be read

The Synology scheduled task reports this as:

Current status: 3 (Interrupted)

Steps to reproduce on my system:

  1. Run restic backup in Docker on Synology DSM.
  2. Use /source as the backup source.
  3. Have a Synology metadata directory such as /source/data/@eaDir.
  4. Add exclude rules for @eaDir, including both glob and absolute-path rules.
  5. Run restic backup or restic backup --dry-run.
  6. restic still prints:
error: /source/data/@eaDir: name "@eaDir" is not greater than last name "@eaDir"

Expected behavior

The excluded @eaDir directory should not cause a backup warning or error.

I would expect restic either:

  1. not to enter /source/data/@eaDir at all because it is excluded, or
  2. at least not to fail the backup with exit status 3 because of an explicitly excluded directory.

Actual behavior

The snapshot is created, but restic exits with status 3.

It prints:

error: /source/data/@eaDir: name "@eaDir" is not greater than last name "@eaDir"

and then:

Warning: at least one source file could not be read

This causes the Synology scheduled task to be marked as interrupted/failed.

Do you have any idea what may have caused this?

This looks like a regression after upgrading restic to the 0.19.x series.

The same backup setup worked before the upgrade.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions