/[health_html]/.data/Makefile
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /.data/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Fri Aug 10 07:38:23 2001 UTC (22 years, 8 months ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
sql storage directory

1 dpavlin 1.1
2     db=PlivaHealth
3     prod=health.pliva.hr
4     dir=/data/health_html
5    
6     all:
7     @echo dump,create,drop,insert,fill
8    
9     dump:
10     pg_dump -s $(db) > $(db)-shema.sql
11     pg_dump -a -d $(db) > $(db)-data.sql
12    
13     dumpall:
14     pg_dump $(db) > $(db).sql
15    
16     create:
17     createdb $(db)
18     drop:
19     psql template1 -c "drop database $(db)"
20    
21     insert:
22     psql $(db) < $(db)-data.sql
23    
24     shema:
25     psql $(db) < $(db)-shema.sql
26    
27     fill: drop create shema insert
28    
29     dist:
30     rsync -a -e "ssh -q" $(dir) $(prod):$(dir)
31    
32     dist-pg:
33     pg_dump --no-reconnect $(db) > $(db).sql
34     scp $(db).sql $(prod):$(dir)
35     ssh $(prod) "createdb $(db) && psql $(db) < $(dir)/$(db).sql"

  ViewVC Help
Powered by ViewVC 1.1.26