|
|
@ -119,12 +119,13 @@ sync_test: sync_test_media sync_test_db |
|
|
|
# Does not sync Galerie and CACHE (too huge).
|
|
|
|
sync_local_media: |
|
|
|
rsync -ave ssh --exclude Galerie --exclude CACHE\
|
|
|
|
www-mam@atrey.karlin.mff.cuni.cz:/akce/MaM/WWW/mamweb-prod/media/ ./media/ |
|
|
|
mam-web@gimli.ms.mff.cuni.cz:/akce/mam/www/mamweb-prod/media/ ./media/ |
|
|
|
# Downloads and restores production database to local database. PostgreSQL only.
|
|
|
|
sync_local_db: |
|
|
|
scp www-mam@atrey.karlin.mff.cuni.cz:`ssh www-mam@atrey.karlin.mff.cuni.cz 'ls -v /akce/MaM/WWW/backups/mam-prod-*\.pgdump | tail -n 1'` \
|
|
|
|
./last.pgdump |
|
|
|
pg_restore -c -d mam_prod last.pgdump |
|
|
|
scp mam-web@gimli.ms.mff.cuni.cz:`ssh mam-web@gimli.ms.mff.cuni.cz 'ls -v /akce/mam/www/backups/mam_prod-*\.pgdump.xz | tail -n 1'` \
|
|
|
|
./last.pgdump.xz |
|
|
|
xz -fd last.pgdump.xz |
|
|
|
pg_restore -c -d mam-prod last.pgdump |
|
|
|
|
|
|
|
# Sync database and media. See above lines
|
|
|
|
sync_local: sync_media sync_db |
|
|
|