Backup rclone mount GDrive

Hello everyone,

I would like to back up my Google Drive using restic. To do this, I have an rclone mount --read-only on a path, e.g., gdrive/.

rclone mount "gdrivetest:Home Assistant Backups" gdrive --read-only -vv

Now I want to back up this folder using restic backup gdrive/, but I get an error for every file in my GDrive:

> restic --repo repo/ backup gdrive/

enter password for repository:
repository 7fa4dc75 opened (version 2, compression level auto)
created new cache in /root/.cache/restic
no parent snapshot found, will read all files
[0:00]          0 index files loaded
error: incomplete metadata for gdrive/Full Backup 2025-10-05 06:00:00.tar: xattr.list gdrive/Full Backup 2025-10-05 06:00:00.tar: input/output error
error: incomplete metadata for gdrive/Full Backup 2025-10-06 06:00:00.tar: xattr.list gdrive/Full Backup 2025-10-06 06:00:00.tar: input/output error
error: incomplete metadata for gdrive/Full Backup 2025-10-07 06:00:00.tar: xattr.list gdrive/Full Backup 2025-10-07 06:00:00.tar: input/output error
error: incomplete metadata for gdrive/Full Backup 2025-10-08 06:00:00.tar: xattr.list gdrive/Full Backup 2025-10-08 06:00:00.tar: input/output error
error: incomplete metadata for gdrive/Full Backup 2025-10-09 06:00:00.tar: xattr.list gdrive/Full Backup 2025-10-09 06:00:00.tar: input/output error
error: incomplete metadata for gdrive/Full Backup 2025-10-10 06:00:00.tar: xattr.list gdrive/Full Backup 2025-10-10 06:00:00.tar: input/output error
error: incomplete metadata for gdrive/Full Backup 2025-10-11 06:00:00.tar: xattr.list gdrive/Full Backup 2025-10-11 06:00:00.tar: input/output error
error: incomplete metadata for gdrive/Full Backup 2025-10-12 06:00:00.tar: xattr.list gdrive/Full Backup 2025-10-12 06:00:00.tar: input/output error
error: incomplete metadata for gdrive/Full Backup 2025-10-13 06:00:00.tar: xattr.list gdrive/Full Backup 2025-10-13 06:00:00.tar: input/output error
error: incomplete metadata for gdrive/Full Backup 2025-10-14 06:00:00.tar: xattr.list gdrive/Full Backup 2025-10-14 06:00:00.tar: input/output error

Files:          10 new,     0 changed,     0 unmodified
Dirs:            1 new,     0 changed,     0 unmodified
Added to the repository: 457.800 MiB (437.978 MiB stored)

processed 10 files, 772.793 MiB in 4:38
snapshot 5a6fba7e saved
Warning: at least one source file could not be read

Is there any way I can disable these extended attributes? I don’t need them, I just want to back up my data on GDrive.

Here are all the relevant snippets for my setup:

> restic version
restic 0.18.0 compiled with go1.24.4 on linux/amd64
> cat ~/.config/rclone/rclone.conf
[gdrivetest]
type = drive
scope = drive
token = REMOVED
team_drive =

> tree -d .
.
β”œβ”€β”€ gdrive  # <-- Mountpoint
└── repo
    β”œβ”€β”€ data
    β”‚   β”œβ”€β”€ 00
    β”‚   β”œβ”€β”€ 01
    β”‚   β”œβ”€β”€ 02
    β”‚   β”œβ”€β”€ [...]
    β”œβ”€β”€ index
    β”œβ”€β”€ keys
    β”œβ”€β”€ locks
    └── snapshots

264 directories

This sounds to me more like an rclone problem and less like a restic thing. I have no idea about extended attributes and even less about gdrive but it could well be that someone in here has. That said, maybe you can find an answer here more easily?

Hey,

You’re absolutely right. It’s an rclone problem. I was just a little confused because I can’t reproduce this error with Zip, even though ZIP should also save xattr?!

Well, I tried the whole thing again with Borg Backup and xattr and got a similar error with both. I’ll attach the two snippets.

My solution to the problem was actually as simple as updating rclone. I have a Debian system and using apt, you get the rclone version rclone v1.60.1-DEV.

After a manual update to rclone v1.71.1, restic recognizes that no xattr are available, or rather, rclone transmits this correctly.


rclone v1.60.1-DEV example:

> xattr "gdrive/Full Backup 2025-10-15 06:00:00.tar"
[Errno 5] Input/output error: b'gdrive/Full Backup 2025-10-15 06:00:00.tar'
> borg create borgrepo/::{now} gdrive/
Enter passphrase for key /root/test/borgrepo:
gdrive/Full Backup 2025-10-14 06:00:00.tar: extended stat (xattrs): [Errno 5] Input/output error: '<FD 6>'
gdrive/Full Backup 2025-10-11 06:00:00.tar: extended stat (xattrs): [Errno 5] Input/output error: '<FD 6>'
gdrive/Full Backup 2025-10-13 06:00:00.tar: extended stat (xattrs): [Errno 5] Input/output error: '<FD 6>'
gdrive/Full Backup 2025-10-15 06:00:00.tar: extended stat (xattrs): [Errno 5] Input/output error: '<FD 6>'
gdrive/Full Backup 2025-10-08 06:00:00.tar: extended stat (xattrs): [Errno 5] Input/output error: '<FD 6>'
gdrive/Full Backup 2025-10-07 06:00:00.tar: extended stat (xattrs): [Errno 5] Input/output error: '<FD 6>'
gdrive/Full Backup 2025-10-12 06:00:00.tar: extended stat (xattrs): [Errno 5] Input/output error: '<FD 6>'
gdrive/Full Backup 2025-10-09 06:00:00.tar: extended stat (xattrs): [Errno 5] Input/output error: '<FD 6>'
gdrive/Full Backup 2025-10-10 06:00:00.tar: extended stat (xattrs): [Errno 5] Input/output error: '<FD 6>'
gdrive/Full Backup 2025-10-06 06:00:00.tar: extended stat (xattrs): [Errno 5] Input/output error: '<FD 6>'

rclone v1.71.1 example:

> xattr "gdrive/Full Backup 2025-10-15 06:00:00.tar"
[Errno 95] Operation not supported: b'gdrive/Full Backup 2025-10-15 06:00:00.tar'
> restic --repo repo/ backup gdrive/
enter password for repository:
repository 7fa4dc75 opened (version 2, compression level auto)
no parent snapshot found, will read all files
[0:00]          0 index files loaded

Files:          10 new,     0 changed,     0 unmodified
Dirs:            1 new,     0 changed,     0 unmodified
Added to the repository: 456.677 MiB (436.408 MiB stored)

processed 10 files, 771.602 MiB in 2:53
snapshot 2ee0c736 saved
1 Like

Interesting. Thanks for sharing!