Project

General

Profile

« Previous | Next » 

Revision 3367

root Makefile: VegBIEN DB: Schemas: schemas/%/backup: Renamed to the name of the file created (schemas/%.backup) so that the file will automatically be removed by make if you cancel the backup. If this didn't happen, the existing partial file would prevent make from backing it up again.

View differences:

Makefile
244 244
schemas/%/uninstall: _always
245 245
	echo $(call rmSchemaCmd,$*)|$(psqlAsBien)
246 246

  
247
backupFile = schemas/$*.backup
248
backup = env data=1 bin/pg_dump_vegbien $* >$(backupFile)
249

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

  
256 253
schemas/%/rm_indexes: _always
257 254
	bin/pg_dump_vegbien $*|bin/mk_rm_indexes|$(psqlAsBien) --echo-all

Also available in: Unified diff