From 156066c9a83ca4a6273d0f61403f054ee93bfdfd Mon Sep 17 00:00:00 2001 From: Klaus Thoden Date: Mon, 9 Mar 2020 14:21:52 +0100 Subject: [PATCH 1/2] Exclude PDF backups --- updatestatic.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/updatestatic.sh b/updatestatic.sh index 8a6be32..559beee 100644 --- a/updatestatic.sh +++ b/updatestatic.sh @@ -1,7 +1,7 @@ #!/usr/bin/zsh sudo rsync -Pazy /home/kthoden/static/eoa/eoa2-production.mpiwg-berlin.mpg.de:9005/ /var/www/eoa/html -sudo rsync -Pazy --exclude index-bak.html /home/kthoden/static/eos/eoa2-production.mpiwg-berlin.mpg.de:9010/ /var/www/eos/html -sudo rsync -Pazy --exclude index-bak.html /home/kthoden/static/mprl/eoa2-production.mpiwg-berlin.mpg.de:9015/ /var/www/mprl/html +sudo rsync -Pazy --exclude index-bak.html --exclude *.pdf.bak /home/kthoden/static/eos/eoa2-production.mpiwg-berlin.mpg.de:9010/ /var/www/eos/html +sudo rsync -Pazy --exclude index-bak.html --exclude *.pdf.bak /home/kthoden/static/mprl/eoa2-production.mpiwg-berlin.mpg.de:9015/ /var/www/mprl/html echo Finito From cc29dbefa63603f213498b00d02f2473372386f1 Mon Sep 17 00:00:00 2001 From: Klaus Thoden Date: Mon, 9 Mar 2020 14:45:53 +0100 Subject: [PATCH 2/2] Make backups before synching --- pulldjango.sh | 0 updatestatic.sh | 3 +++ 2 files changed, 3 insertions(+) mode change 100644 => 100755 pulldjango.sh mode change 100644 => 100755 updatestatic.sh diff --git a/pulldjango.sh b/pulldjango.sh old mode 100644 new mode 100755 diff --git a/updatestatic.sh b/updatestatic.sh old mode 100644 new mode 100755 index 559beee..c577bcf --- a/updatestatic.sh +++ b/updatestatic.sh @@ -1,7 +1,10 @@ #!/usr/bin/zsh +cp -rv /var/www/eoa /home/kthoden/backups/eoa_$(date -I) sudo rsync -Pazy /home/kthoden/static/eoa/eoa2-production.mpiwg-berlin.mpg.de:9005/ /var/www/eoa/html +cp -rv /var/www/eos /home/kthoden/backups/eos_$(date -I) sudo rsync -Pazy --exclude index-bak.html --exclude *.pdf.bak /home/kthoden/static/eos/eoa2-production.mpiwg-berlin.mpg.de:9010/ /var/www/eos/html +cp -rv /var/www/mprl /home/kthoden/backups/mprl_$(date -I) sudo rsync -Pazy --exclude index-bak.html --exclude *.pdf.bak /home/kthoden/static/mprl/eoa2-production.mpiwg-berlin.mpg.de:9015/ /var/www/mprl/html echo Finito