I’d like to export a snapshot to another server, so I made tar.bz2 file from following command.
$ tar --use-compress-program=pbzip2 -cvf ctc_lmdb_210104.tar.bz2 /var/lib/docker/volumes/server_validator-block-volume/_data
And another server’s disk went to full, when unzipping the result tar file. (~3TB, I guess)
How can I export sawtooth ledger’s snapshot?
Just tar&zipping seems not to enough.
Using the snapshot file from company’s google drive worked well. Disk usage was not exceeded, but need so much time to catch up to sync.
감사합니다, YJH님.
sparse mode를 이용하면 되는군요.
덕분에 스냅샷 잘 찍었습니다.
sparse모드와 멀티코어를 이용하면 압축 시간을 획기적으로 줄일 수 있네요.
싱글코어와 sparse mode 미지정 시 46분 정도 걸리고, 멀티코어와 sparse mode 지정 시 8분 정도 걸렸습니다.
In case you want to utilize multicore processor, use pbzip2 to zip&unzip.
$ apt-get update
$ apt-get install pbzip2
#압축 시 명령어
$ cd /var/lib/docker/volumes/server_validator-block-volume/
$ tar --use-compress-program=pbzip2 -Scvf ctc_lmdb.tar.bz2 _data
#압축 해제 시 명령어
$ cp ctc_lmdb.tar.bz2 /var/lib/docker/volumes/server_validator-block-volume/
$ tar --use-compress-program=pbzip2 -xvf ctc_lmdb.tar.bz2