From f49524070189d7b46c4ca257e63301d2b3af6655 Mon Sep 17 00:00:00 2001 From: "Tomas \"Jethro\" Pokorny" Date: Fri, 14 Sep 2018 17:53:26 +0200 Subject: [PATCH] Fixed sync_local_db and sync_local_media. --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 789e5a0c..51bbdfad 100644 --- a/Makefile +++ b/Makefile @@ -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