mysql_checkpoint.sh 234 Bytes
Newer Older
kaiyou's avatar
kaiyou committed
1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/sh

PROJECTDIR=$1
BASEDIR=${2:-$PROJECTDIR}
SERVICE=${3:-db}

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