# Migration Steps:

1) Mongo Dump (~12GB uncompressed, ~1.300.000 records):
	
	> mongoexport --db=openaireplus_apis --collection=recent_publications --out=directindex.dump.json
	> gzip directindex.dump.json
	> scp USER@services.openaire.eu:directindex.dump.json.gz ~/Develop/scripts/directindex-migration 

2) Processing the dump:

	> gunzip -c directindex.dump.json.gz | process.pl > directindex.import.tsv
	
3) Load the records on the new database

	psql> \copy pending_actions(id, type, operation, body, created_by, creation_date) FROM 'directindex.import.tsv' DELIMITER E'\t';

