Add backup file for animerss

This commit is contained in:
Tim 2022-11-02 17:10:44 +01:00
parent a4c7603591
commit 41a372ee92
2 changed files with 6 additions and 1 deletions

5
bin/bin/arbackup Executable file
View File

@ -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}

View File

@ -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]') 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 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}