From 41a372ee920b9eae46ce1be4dd8bc1df7982f12b Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 2 Nov 2022 17:10:44 +0100 Subject: [PATCH] Add backup file for animerss --- bin/bin/arbackup | 5 +++++ bin/bin/blbackup | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 bin/bin/arbackup 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}