Skip to main content
2 of 4
added 170 characters in body
MattHusz
  • 269
  • 4
  • 14

btrfs error failed to clone extents during incremental backup

I'm attempting to perform a backup to an external hard drive. Both the native drive and external drive use a BTRFS filesystem. I do this by first creating a read-only snapshot of my home directory:

# btrfs subvolume snapshot -r /home /.snapshots/home/BACKUP

Followed by a send/receive to the backup drive:

# btrfs send /.snapshots/home/BACKUP | btrfs receive /.backup/home

I get this output:

At subvol /.snapshots/home/BACKUP
At subvol BACKUP
ERROR: failed to clone extents to matt/.local/share/Anki2/Matt/collection.anki2: Invalid argument

where the error occurs after a minute or so. I tried with several different snapshots and got the same error on each. Moreover, I couldn't find that file in any of the snapshots. I thought this might be some sort of disk corruption error, so I booted into a USB OS image and ran

# btrfs check --repair /dev/mapper/...

on the unmounted filesystem. This reported no errors. After booting back into the filesystem, I tried the backup again and got the same error. Any thoughts on what could be causing this?


EDIT

As per Emmanuel Rosa's comment, I tried

# btrfs scrub start -B /

which exited without errors. The issue is still present after the scrub.

MattHusz
  • 269
  • 4
  • 14