diff --git a/bin/bin/dbbackup.sh b/bin/bin/dbbackup.sh new file mode 100755 index 0000000..e4d2339 --- /dev/null +++ b/bin/bin/dbbackup.sh @@ -0,0 +1,8 @@ +#/bin/sh + +database=$1 +command="cd dbmanager && ./bin/console db:backup ${database}" + +name=$(ssh www-data@cemophora "${command}" | awk -F'-|\\.def' '{split($1,a," ")}$0=a[4]') +scp -C www-data@cemophora:/var/www/dbmanager/${name} ~/projects/dbmanager +cd ~/projects/dbmanager && ./bin/console db:purge ${database} && ./bin/console db:restore ${database} ${name}