sist2
sist2 copied to clipboard
Incremental scan cannot open old index
sist2 version: 2.11.7
Platform (Linux or Docker, x86-64 or arm64): 4.18.0-193.14.2.el8_2.x86_64
Elasticsearch version: 7.9.2
Command with arguments: /opt/sist2/sist2-x64-linux-debug scan -t 4 /media/skaner --incremental=/opt/sist2/media-skaner -o /opt/sist2/media-skaner-tmp
I have this script to do incremental scan and index.
If i run it first time everything works fine:
/opt/sist2/sist2-x64-linux-debug scan -t 2 /media/skaner -o /opt/sist2/media-skaner
On the second run:
/opt/sist2/sist2-x64-linux-debug scan -t 2 /media/skaner --incremental=/opt/sist2/media-skaner -o /opt/sist2/media-skaner-tmp
i get:
[7F6A6E804AC0] [2022-04-04 08:18:37] [FATAL main.c] Could not open original main index for incremental scan: Success
Script i use:
#!/bin/bash
set -x
dir=/opt/sist2
sist=$dir/sist2-x64-linux
sist=$dir/sist2-x64-linux-debug
cd $dir
array=( media/skaner media/doc media/ses)
for i in "${array[@]}"
do
j=$(echo $i | sed 's/\//-/')
if [ -d $j ]
then
$sist scan -t 2 /$i --incremental=$j -o $j-tmp
rm -rf $j
mv $j-tmp $j
else
$sist scan -t 2 /$i -o $j
fi
$sist index -t 2 $j
list="$list $j"
done
$sist web --bind=192.168.4.18:8081 --auth=a:b $list
If i remove index files and folders first scan and index completes and starts webserver. Second run gives me scan errors and blank screen during index. I don't want to repeat full scan every time.
Could you give more information about your OS (which distro etc.) ? I can't seem to reproduce that error on my side
Did you ever get this fixed? I am having the same problem, in docker and as binary on debian.
After a lot of testing, the incremental scan is a bit buggy:
Incremental scan only worked in my test (no errors) when new files were added to the folder being scanned.
the bugs I found that produced this error "Could not open original main index for incremental scan:":
- incremental scan without changes in the folder to be scanned (worked once, the second time it gave the error)
- incremental scan with deleting files in folder being scanned (worked once, the second time it gave the error)
it seems as if the original index is not being copied over to the new index when there are no file changes or deletion of files
thanks this will be fixed in an upcoming update
Fixed in c18557e360b30f6bba5c1c767ac30aab23185dda, will be included in the next update 2.13.0