Browse Source

Pridana synchronizace lokalniho vyvoje s atreyem.

Pridany tri nove cile:
sync_db: stahne posledni zalohu produkcni databaze a nahraje ji do
	lokalniho postgresu
sync_media: stahne slozku /media bez CACHE a galerii do lokalniho /media
sync: Udela sync_media a sync_db
remotes/origin/bug
Tomas Jethro Pokorny 9 years ago
parent
commit
06fd3c7d90
  1. 13
      Makefile

13
Makefile

@ -93,3 +93,16 @@ deploy_prod:
touch mamweb/wsgi.py touch mamweb/wsgi.py
@echo Done. @echo Done.
# Sync media directory with atrey. Useful for local development with production database
# Does not sync Galerie and CACHE (too huge).
sync_media:
rsync -ave ssh --exclude Galerie --exclude CACHE\
atrey.karlin.mff.cuni.cz:/akce/MaM/WWW/mamweb-prod/media/ ./media/
# Downloads and restores production database to local database. PostgreSQL only.
sync_db:
scp atrey.karlin.mff.cuni.cz:`ssh atrey.karlin.mff.cuni.cz 'ls -v /akce/MaM/WWW/backups/mam-prod-*\.pgdump | tail -n 1'` \
./last.pgdump
pg_restore -c -d mam -U mam last.pgdump
# Sync database and media. See above lines
sync: sync_media sync_db

Loading…
Cancel
Save