mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 04:03:49 +00:00
19 lines
469 B
Bash
19 lines
469 B
Bash
|
|
||
|
|
||
|
dir=$1
|
||
|
files=$(ls $dir/snapshots | grep tr | grep -v tor | grep seg | sort -n -t$'-' -k1)
|
||
|
for file in $files
|
||
|
do
|
||
|
# mv $dir/snapshots/$file $dir/snapshots/$file.old
|
||
|
from=$dir/snapshots/$file
|
||
|
to=$dir/snapshots/$file.new
|
||
|
echo "file: $file"
|
||
|
|
||
|
./build/bin/erigon snapshots uncompress $from | ./build/bin/erigon snapshots compress $to --datadir=$dir
|
||
|
a=$(du -h $from | awk '{print $1;}')
|
||
|
b=$(du -h $to | awk '{print $1;}')
|
||
|
echo "size: $a -> $b"
|
||
|
done
|
||
|
|
||
|
|