Fixed sync_local_db and sync_local_media.
This commit is contained in:
parent
7c1838bb20
commit
f495240701
1 changed files with 5 additions and 4 deletions
9
Makefile
9
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
|
||||
|
|
Loading…
Reference in a new issue