forked from argilla/tools
31 lines
585 B
Bash
Executable File
31 lines
585 B
Bash
Executable File
#!/bin/bash
|
|
|
|
source ./env
|
|
|
|
NOW=$(date +'%Y-%m-%d-%H-%M-%S')
|
|
|
|
case $1 in
|
|
# argilla project $name backup
|
|
project)
|
|
case $3 in
|
|
backup)
|
|
docker-compose -f $REPO_DOCKER_PATH/$2/docker-compose.yml down
|
|
tar cf $BACKUP_PATH/$2-$NOW.tar.gz /srv/$2
|
|
docker-compose -f $REPO_DOCKER_PATH/$2/docker-compose.yml up -d
|
|
;;
|
|
*)
|
|
echo "bad command"
|
|
exit 1
|
|
;;
|
|
esac
|
|
;;
|
|
*)
|
|
echo "bad parameter"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
exit 0
|
|
|
|
|