diff --git a/bin/bin/arbackup b/bin/bin/arbackup new file mode 100755 index 0000000..7ff1d7e --- /dev/null +++ b/bin/bin/arbackup @@ -0,0 +1,5 @@ +#/bin/sh + +name=$(ssh www-data@cemophora 'cd dbmanager && ./bin/console db:backup animerss' | 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 animerss && ./bin/console db:restore animerss ${name} diff --git a/bin/bin/blbackup b/bin/bin/blbackup index ef6a241..eed47d0 100755 --- a/bin/bin/blbackup +++ b/bin/bin/blbackup @@ -2,4 +2,4 @@ name=$(ssh www-data@cemophora 'cd dbmanager && ./bin/console db:backup bluelinked' | 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:restore bluelinked ${name} +cd ~/projects/dbmanager && ./bin/console db:purge bluelinked && ./bin/console db:restore bluelinked ${name}