Figure out why backup is failing

I use the backup tool in Plasma 5.27.12 to save my home directory into an external USB drive. Since yesterday, all backup attempts are failing. Log says “No such file or directory” but doesn’t say which file or directory could not be found:

Kup is starting bup backup job at Tuesday 8 April 2025 09:46:08 CEST

bup "-d" "/media/alvaro/backup-ps-agv/KDE Backup" "init"
bup "-d" "/media/alvaro/backup-ps-agv/KDE Backup" "fsck" "--quick" "-j" "4"
Exit code: 0
bup "-d" "/media/alvaro/backup-ps-agv/KDE Backup" "index" "-u" "--exclude" "/home/alvaro/.cache" "--exclude" "/home/alvaro/.local/share/Trash" "--exclude" "/home/alvaro/.local/share/baloo" "--exclude-rx-from" "/home/alvaro/Backup/bup-exclude.txt" "/home/alvaro"
[Errno 2] No such file or directory                                   
WARNING: 1 errors encountered.

Exit code: 1
Kup did not successfully complete the bup backup job: failed to index everything.

To confirm, I run the commands manually, init and fsck work fine, but index fails with these messages:

[Errno 2] No such file or directory                                                                                                                                                                           
Indexing: 961541, done (10766 paths/s).                                                                                                                                                                       
bup: merging indexes (12210600/12210600), done.                                                                                                                                                               
WARNING: 1 errors encountered.

Adding verbosity flags, I just get before the indexing phase a detailed list of the files and directories being scanned:

[...]
/home/alvaro/.Microsoft/webview/localstorage/https_login.microsoftonline.com_0.localstorage                                                                                                                   
/home/alvaro/.Microsoft/webview/localstorage/                                                                                                                                                                 
/home/alvaro/.Microsoft/webview/.lock                                                                                                                                                                         
/home/alvaro/.Microsoft/webview/                                                                                                                                                                              
/home/alvaro/.Microsoft/                                                                                                                                                                                      
/home/alvaro/                                                                                                                                                                                                 
Indexing: 961607, done (9884 paths/s).                                                                                                                                                                        
bup: merging indexes (12210737/12210737), done.                                                                                                                                                               
WARNING: 1 errors encountered. 

I can’t find any meaningful reference to bup in journalctl output or the entire /var/log directory.

External drive is by no means full.

I’ve tried saving the backup in the local drive, and now I get the same exact messages after initialisation and two errors on further updates:

Reinitialized existing Git repository in /home/alvaro/NoBackup/test-bup/                                                                                                                                      
[Errno 2] No such file or directory                                                                                                                                                                           
[Errno 2] No such file or directory                                                                                                                                                                           
Indexing: 1396336, done (18695 paths/s).                                                                                                                                                                      
bup: merging indexes (1396342/1396342), done.                                                                                                                                                                 
WARNING: 2 errors encountered.

I’ve stripped all options from the command and it still fails.

I ran out of ideas.

Hi - since the underlying command-line tool is showing the same issue, it might be worth checking around that project’s site or mailing list:

my idea after initially trying the built in backup feature was to look elsewhere, sorry to say.

luckybackup works for me… and pika i think is also good but too gnome like for my tastes.

Agreed, Pika is a really good tool - one of the best implementations of the GNOME and libadwaita design, in my opinion. If it’s of interest, Vorta also uses the Borg backend, but with a Qt frontend.

Give KUP a try. I used luckybackup a few years ago. I went to look for an alternative and stumbled on Kup, depending on your distribution Kup may not be available due to the name Kup which conflicts with (Kernel Uploader). Some distribution do rename KUP to avoid this conflict.

1 Like

Thank you for your suggestions. I have to say that KDE frontend for bup has been serving me well for 3 years and it’s awesome for my use case, because being powered by git means that I can store a year worth of modifications using very little storage. Also, I haven’t contacted bup community because I think the project is essentially abandoned (main support channel is a mailing list in Google Groups, which closed a while ago), and so are some other alternatives you’ve suggested.

In the end, I wrote this little script:

#!/bin/bash

bup "-d" /home/alvaro/NoBackup/test-bup "init"

shopt -s dotglob
for f in /home/alvaro/*
do
    echo 👉 Scanning "$f"
    bup "-d" /home/alvaro/NoBackup/test-bup "index" "-u" \
        "$f"
    echo Scanning finished
done
echo Script finished

Once I found the directory that was causing the error, I refined $f with the new subpath and executed the script. The culprit was a Redis cache file that is locked for reading for other processes:

Reinitialized existing Git repository in /home/alvaro/NoBackup/test-bup/                                                                                                                                      
👉 Scanning /home/alvaro/projects/REDACTED/redis-cache/dump.rdb
[Errno 13] Permission denied: b'/home/alvaro/projects/REDACTED/redis-cache/dump.rdb'                                                                                                           
Indexing: 0, done (0 paths/s).                                                                                                                                                                                
WARNING: 1 errors encountered.                                                                                                                                                                                
Scanning finished
Script finished

This file has been there for months and it’s explicitly mentioned in my exclude file, which I also haven’t modified in months. I’ve tried all the options to exclude files explained in the documentation and none work at all.

Then I discovered that when I edit the backup plan in KDE settings and go to “Sources”, I get a prominent warning:

I’m running a backup now. If this doesn’t work either, I’ll just throw the laptop through the window and call it a day.

1 Like

image

The version of Kup in most distros with Plasma 5 seem to still be at v0.9, which has been a bit buggy, from my experience. It is why I built it from source for a while, until 0.1.0 made it into KDE neon’s repos. It has been solid for me as well, and I think I have been using it for over three years myself. Probably closer to five. Basically, I set it once and forget it, until I mess something up.

2 Likes

FWIW, bup is still maintained and there have been recent updates made to it to address possible corruption issues with the archive. If you haven’t recently updated, you might want to seriously consider doing so; details at bup/note/0.33.5-from-0.33.4.md at main · bup/bup · GitHub and How bup (before 0.33.5) might create incomplete trees.

2 Likes