Project

General

Profile

« Previous | Next » 

Revision 3373

main Makefile: VegBIEN DB: Schemas: Added schemas/%.backup/restore and documented it in README.TXT

View differences:

README.TXT
15 15
        Note: This will archive the last import.
16 16
    Back up an archived import: make schemas/public.<date>.backup &
17 17
        Note: To back up the last import, you must archive it first (see above)
18
    Restore an archived import: make schemas/public.<date>.backup/restore &
18 19
    Empty the DB: make schemas/reinstall
19 20
        WARNING: This will delete the current public schema of your VegBIEN DB!
20 21

  
Makefile
250 250
schemas/%.backup:
251 251
	$(if $(wildcard $@),,"time" env data=1 bin/pg_dump_vegbien $* >$@)
252 252

  
253
restoreBien = "time" bin/postgres_vegbien pg_restore --exit-on-error --verbose\
254
--dbname=vegbien
255
# pg_restore doesn't support PGDATABASE env var
256

  
257
schemas/%.backup/restore: schemas/%.backup _always
258
	$(restoreBien) $< &>$<.log
259

  
253 260
schemas/%/rm_indexes: _always
254 261
	bin/pg_dump_vegbien $*|bin/mk_rm_indexes|$(psqlAsBien) --echo-all
255 262

  

Also available in: Unified diff