Jamie Burchell via BackupPC-users wrote at about 23:31:12 +0100 on Wednesday,
July 8, 2026:
> Hi
>
> I needed to identify backups with missing pool files in the past. This one
> liner worked for me in Linux (substitute a0 and the full hash with your
> details):
>
> # Find a "missing pool file"
> # a0 is the first two letters of the hash of the file we are looking for:
> "a06340ddb577fd02a04bda2998a8d246"
> find ./pc -name "poolCnt.1.a0" -exec sh -c 'for f; do
> /usr/share/BackupPC/bin/BackupPC_poolCntPrint "$f" | grep -q
> "a06340ddb577fd02a04bda2998a8d246" && echo "Match: $f"; done' sh {} +
>
You can do this *much* faster if your backup is very large by
first finding matching hosts then matching backups:
(Here is some sample code - likely to have some stupid errors in it :)
)
POOL_FILE="a06340ddb577fd02a04bda2998a8d246"
printf -v POOL_DIR "%x%x" $(( 0x${hash:0:1} & 0xe )) $(( 0x${hash:1:1} & 0xe ))
for h in $(\ls "./pc/*/refCnt/poolCnt.1.$POOL_DIR"); do
if /usr/share/BackupPC/bin/BackupPC_poolCntPrint "$h" | grep -q
"$POOL_FILE"; then
echo "Matching host: $h"
for n in $(\ls "./pc/$h/$n/refCnt/poolCnt.1.$POOL_DIR"); do
if /usr/share/BackupPC/bin/BackupPC_poolCntPrint "$n" |
grep -q "$POOL_FILE"; then
echo " Matching backup: $h"
done
done
You can stop after the first match or continue to find all matching...
_______________________________________________
BackupPC-users mailing list
[email protected]
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/