diff --git a/太鼓ウェブのデータベース.txt b/太鼓ウェブのデータベース.txt new file mode 100644 index 0000000..f5d96ef --- /dev/null +++ b/太鼓ウェブのデータベース.txt @@ -0,0 +1,20 @@ +エクスポート + +$ docker exec -i taiko-mongo mongoexport --db taiko --collection users --out /dev/stdout | sort -n > users.json +$ docker exec -i taiko-mongo mongoexport --db taiko --collection songs --out /dev/stdout | sort -n > songs.json +$ docker exec -i taiko-mongo mongoexport --db taiko --collection scores --out /dev/stdout | sort -n > scores.json + +コミット&プッシュ + +$ git add *.json +$ git commit --author="BOT " -m "$(git diff --name-only --cached | paste -s -d ' ') が更新されました" +$ git push origin main + +インポート + +$ docker cp users.json taiko-mongo:/a +$ docker exec -i taiko-mongo mongoimport --db taiko --collection users /a +$ docker cp songs.json taiko-mongo:/b +$ docker exec -i taiko-mongo mongoimport --db taiko --collection songs /b +$ docker cp scores.json taiko-mongo:/c +$ docker exec -i taiko-mongo mongoimport --db taiko --collection scores /c