Error in btrfs-receive when directory was replaced with subvolume between backups
- Dominant language
- Perl
- Stars
- 2.1k
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Description
One the directories in my machine stores videos that I download, which means there are lots of big files being put there, and roughly the same amount being deleted, very often. So this was filling-up my backup HD. I transformed it into a btrfs subvolume using commands similar to this:
```sh
mv $DIR $DIR.old
btrfs subvolume create $DIR
cp --reflink=always $DIR.old/. $DIR
rm -r $DIR.old
```
But now, when I run `btrbk`, `btrfs receive` throws an error. The relevant lines when running it with `--log debug` are these:
```
unlink o822875-724-0/$FILE
rmdir o822875-724-0
ERROR: rmdir o822875-724-0 failed: Directory not empty
```
I'm not sure this is the appropriate repo where to open this issue, but I thought I'd try.
The question: how do I resume backups? I don't care about preserving the contents of that directory across snapshots or even backups. I'd like to avoid doing a complete backup from scratch.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the reported btrbk run with --log debug and examine the btrfs receive operation around the unlink and rmdir messages. Determine how backups can resume after a directory is replaced by a subvolume, and consider the work complete when incremental backups proceed without requiring a full backup from scratch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100