Project

General

Profile

« Previous | Next » 

Revision 3393

Moved archived imports and make targets to maintain them to new backups dir

View differences:

Makefile
243 243
	-<$< $(psqlAsBien)
244 244
# ignore errors if schema exists
245 245

  
246
# /%.backup must come before /% to be matched first
247
schemas/%.backup/uninstall schemas/%/uninstall: _always
246
schemas/%/uninstall: _always
248 247
	echo $(call rmSchemaCmd,$*)|$(psqlAsBien)
249 248

  
250
# Note: This can't be used for the current (unrotated) public schema because
251
# pg_dump doesn't back up the CREATE SCHEMA statement for it, assuming falsely
252
# that public already exists because it's in template1.
253
schemas/%.backup:
254
	"time" env data=1 bin/pg_dump_vegbien $* >$@
255

  
256
restore := "time" bin/postgres_vegbien pg_restore --exit-on-error --verbose
257
restoreBien := $(restore) --dbname=vegbien
258
# pg_restore doesn't support PGDATABASE env var
259

  
260
schemas/%.backup/restore: schemas/%.backup _always
261
	$(restoreBien) $< &>$<.log
262

  
263
schemas/%.sql: schemas/%.backup
264
	$(restore) $< >$@ 2>$<.extract.log
265

  
266
schemas/%/rm_indexes: _always
267
	bin/pg_dump_vegbien $*|bin/mk_rm_indexes|$(psqlAsBien) --echo-all
268

  
269 249
# Needed on Ubuntu 12.04 (also other Linuxes?) because %/reinstall is ignored.
270 250
schemas/temp/reinstall: _always schemas/temp/uninstall schemas/temp/install ;
271 251

  

Also available in: Unified diff