Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update scripts
  • Loading branch information
Klaus Thoden committed Dec 22, 2021
1 parent aa7e2dd commit 6d0ca52
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
17 changes: 12 additions & 5 deletions pulldjango.sh
@@ -1,9 +1,16 @@
#!/usr/bin/zsh

wget -P /home/kthoden/static/eoa --mirror --convert-links --adjust-extension --page-requisites --no-parent http://eoa2-production.mpiwg-berlin.mpg.de:9005
wget -P /home/kthoden/static/eos --mirror --convert-links --adjust-extension --page-requisites --no-parent http://eoa2-production.mpiwg-berlin.mpg.de:9010
python3 /home/kthoden/src/eoa_makestatic/makestatic.py /home/kthoden/static/eos/eoa2-production.mpiwg-berlin.mpg.de:9010
wget -P /home/kthoden/static/mprl --mirror --convert-links --adjust-extension --page-requisites --no-parent http://eoa2-production.mpiwg-berlin.mpg.de:9015
python3 /home/kthoden/src/eoa_makestatic/makestatic.py /home/kthoden/static/mprl/eoa2-production.mpiwg-berlin.mpg.de:9015
EOA_STATIC_DIR=/home/eoauser/static
MAKE_STATIC_PY=/home/eoauser/src/eoa_makestatic/makestatic.py
EOA_SRC_DIR=/home/eoauser/src

rm -rf $EOA_STATIC_DIR/eoa/*
rm -rf $EOA_STATIC_DIR/eos/*
rm -rf $EOA_STATIC_DIR/mprl/*

wget -P $EOA_STATIC_DIR/eoa --mirror --convert-links --adjust-extension --page-requisites --no-parent http://eoa2-production.mpiwg-berlin.mpg.de:9005
wget -P $EOA_STATIC_DIR/eos --mirror --convert-links --adjust-extension --page-requisites --no-parent http://eoa2-production.mpiwg-berlin.mpg.de:9010
wget -P $EOA_STATIC_DIR/mprl --mirror --convert-links --adjust-extension --page-requisites --no-parent http://eoa2-production.mpiwg-berlin.mpg.de:9015
python3 $EOA_SRC_DIR/eoa_makestatic/makestatic.py $EOA_STATIC_DIR/mprl/eoa2-production.mpiwg-berlin.mpg.de:9015

echo Finito
17 changes: 11 additions & 6 deletions updatestatic.sh
@@ -1,10 +1,15 @@
#!/usr/bin/zsh

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
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
EOA_STATIC_DIR=/home/eoauser/static
MAKE_STATIC_PY=/home/eoauser/src/eoa_makestatic/makestatic.py
EOA_SRC_DIR=/home/eoauser/src

echo Backing up with rsnapshot
rsnapshot -c /home/eoauser/etc/rsnapshot.conf alpha

echo Sync the new pages
sudo rsync -Pazy $EOA_STATIC_DIR/eoa/eoa2-production.mpiwg-berlin.mpg.de:9005/ /var/www/eoa/html
sudo rsync -Pazy --exclude-from=/home/eoauser/updatestaticexcludefile $EOA_STATIC_DIR/eos/eoa2-production.mpiwg-berlin.mpg.de:9010/ /var/www/eos/html
sudo rsync -Pazy --exclude-from=/home/eoauser/updatestaticexcludefile $EOA_STATIC_DIR/mprl/eoa2-production.mpiwg-berlin.mpg.de:9015/ /var/www/mprl/html

echo Finito

0 comments on commit 6d0ca52

Please sign in to comment.