[Borgbackup] borg delete failed

Thomas Waldmann tw at waldmann-edv.de
Sat May 27 05:01:44 EDT 2023


>>   File "/usr/lib64/python3.10/site-packages/borg/repository.py", line 
>> 380, in destroy
>>     shutil.rmtree(self.path)

That call should completely remove the directory and all stuff inside.

>> OSError: [Errno 39] Directory not empty: '20'

But it failed to do so, because there was something inside a directory 
when it tried to rmdir that directory. It usually does the rmdir 
**after** removing all stuff inside the directory (files and subdirs), 
so that is unexpected.

Possible explanations:
- there was acticity in that directory in parallel (should not be borg, 
because borg delete locks the repository). did you use borg break-lock?
- filesystem malfunctioning
- bug in shutil.rmtree

> I am not sure what that means. There were a "data" subdir, containing 
> further subdirs. By now, I solved this by
> 
>> rm -r /mnt/rs1219a/Boris

Yeah, but that should do a quite similar thing as shutil.rmtree does.
Maybe it was successful because then there was no parallel activity or 
the fs behaved better that time.


More information about the Borgbackup mailing list