Last active
November 23, 2022 22:20
-
-
Save aoirint/bea0bb8339b74b75774eda34c9e891d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# mcpixelmonのバックアップデータサイズを削減するための変換スクリプト | |
# ゲームファイルやDynmapのキャッシュを含めていたものから、ワールドデータだけを抜き出して再圧縮する | |
# 所有者維持のため、root権限で実行する | |
set -eux | |
set -o pipefail | |
mkdir -p dest | |
for file in ./*.7z | |
do | |
basename=$(basename "$file") | |
newfile=data_world_${basename:5} | |
rm -rf data/ | |
7z x "$file" data/FeedTheBeast/serverpack/world | |
7z a "dest/$newfile" data/FeedTheBeast/serverpack/world | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
削減効果(mcpixelmon)
1.54 GB -> 711 MB
2.34 GB -> 814 MB
3.05 GB -> 888 MB
total: 32.7 GB -> 10.2 GB
削減効果(biome)
total: 6.44 GB -> 1.80 GB