mysql_checkpoint.sh 224 Bytes
Newer Older
kaiyou's avatar
kaiyou committed
1 2 3
#!/bin/sh

PROJECTDIR=$1
kaiyou's avatar
kaiyou committed
4
BASEDIR=${2:-.}
kaiyou's avatar
kaiyou committed
5 6 7 8 9
SERVICE=${3:-db}

cd $PROJECTDIR
docker-compose stop $SERVICE
rm $BASEDIR/wal/*
kaiyou's avatar
kaiyou committed
10
tar -zcf $BASEDIR/wal/$(date +%s).tar.gz $BASEDIR/db
kaiyou's avatar
kaiyou committed
11 12
docker-compose up -d $SERVICE
ls -lah $BASEDIR/wal