Hi

We noticed the log message about missing pool files appear in the log mostly if there was an improper shutdown of the BackupPC Server while a backup was in progress.

We developed the following script to get the affected host and backup number for each reported missing pool file. The only remedy we found to get rid of the error is to delete the affected backups. Please let me know if you find any other remedy.

The way it works is that it extracts the hash of the missing pool file, subtracts one from the first two letters of the hex value to find the correct subfolder in the pool and then correlates that with a backup and a host.

In the following script I think most paths are the default for a rpm based BackupPC installation but adapt the paths to the installation on your system. In particular

- the path to the BackupPC log file
- the path to your pool

#!/bin/bash
#
# Script for investigation of missing pool files
#

LOG_FILE_NAME="/home/backuppc/find_missing_pool_files_$(date +%Y%m%d-%H:%m).log" echo Search for missing pool files started. Logs will be written to "$LOG_FILE_NAME"

MISSING_POOL_FILES_HASHES=$(grep 'missing pool' /var/log/BackupPC/LOG | cut -d' ' -f10)

for full_hex in $MISSING_POOL_FILES_HASHES; do
    hex_val=${full_hex:0:2}
    hex_val_decr=$(printf "%X" $((0x$hex_val - 1)) | awk '{print tolower($0)}')
    paths="/srv/backuppc/pc/*/*/refCnt/poolCnt.1.$hex_val_decr"

    echo "$hex_val - 1 = $hex_val_decr"

    for path in $paths; do
        echo "$path"
        if test -f "$path"; then
            echo one found
pool_cnt_print=$(/usr/share/BackupPC/bin/BackupPC_poolCntPrint "$path")
            pool_cnt_match=$(echo "$pool_cnt_print" | grep "$full_hex")

            if [ -n "$pool_cnt_match" ]; then
                host=$(echo "$path" | cut -d'/' -f5)
                backup_number=$(echo "$path" | cut -d'/' -f6)
                echo Found "$full_hex" in Backup Nr. "$backup_number" of host "$host" | tee -a "$LOG_FILE_NAME"                 /usr/share/BackupPC/bin/BackupPC_ls -R -h "$host" -n "$backup_number" -s / / | grep -E "$full_hex"
            fi
        fi
    done
done

--

Tim Herren
System Engineer

On 12/11/23 05:34, Samual Flossie wrote:
Thanks for looking deeper. I agree that these missing pool file warnings are ominous news for recovery.  The link you referenced ( https://www.mail-archive.com/backuppc-users@lists.sourceforge.net/msg33090.html) indicates to me also that in v4, the missing pool file message is not benign.

It will take me at least a few days to run a full recovery analysis to see if there are file recovery issues.

Do you know how to get the file/backup#/host from a pool file reference that was reported missing in the log? That detail would certainly help speed up my analysis and potential recovery.

I’ll update once that’s done and have some actionable data.

Sam


_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/

Reply via email to