Add more generic script for transferring database
This commit is contained in:
parent
55aeed421a
commit
39abee7c6f
8
bin/bin/dbbackup.sh
Executable file
8
bin/bin/dbbackup.sh
Executable file
@ -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}
|
Loading…
Reference in New Issue
Block a user