From 009828033f9aec6e835b9a58792187f4dcddf678 Mon Sep 17 00:00:00 2001 From: Klaus Thoden Date: Mon, 25 May 2020 17:18:49 +0200 Subject: [PATCH] Exclude backup files --- excludefile | 2 ++ updatestatic.sh | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 excludefile diff --git a/excludefile b/excludefile new file mode 100644 index 0000000..2f1c0a3 --- /dev/null +++ b/excludefile @@ -0,0 +1,2 @@ +index-bak.html +*.pdf.bak diff --git a/updatestatic.sh b/updatestatic.sh index c577bcf..203d3f9 100755 --- a/updatestatic.sh +++ b/updatestatic.sh @@ -1,10 +1,10 @@ #!/usr/bin/zsh -cp -rv /var/www/eoa /home/kthoden/backups/eoa_$(date -I) +rsync -Pazy /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 +rsync -Pazy /var/www/eos /home/kthoden/backups/eos_$(date -I) +sudo rsync -Pazy --exclude-from=/home/kthoden/updatestaticexcludefile /home/kthoden/static/eos/eoa2-production.mpiwg-berlin.mpg.de:9010/ /var/www/eos/html +rsync -Pazy /var/www/mprl /home/kthoden/backups/mprl_$(date -I) +sudo rsync -Pazy --exclude-from=/home/kthoden/updatestaticexcludefile /home/kthoden/static/mprl/eoa2-production.mpiwg-berlin.mpg.de:9015/ /var/www/mprl/html echo Finito