Monday, December 26, 2016

nohup to Import osm planet into postgres

To keep the process running after closing the ssh connection, specially when using that in a very long process, Using this command the program will run in background and you can close your terminal, also it will not log anything to disk
must be from osm account
  
nohup osm2pgsql --slim -d gis -C 16000 --hstore -S openstreetmap-carto-2.45.1/openstreetmap-carto.style planet-latest.osm.pbf > /dev/null 2>&1&

If you prefer to save nodes to file :
  
nohup osm2pgsql --slim -d gis -C 16000 --hstore --flat-nodes ~/flat_nodes/flatnodes -S openstreetmap-carto-2.45.1/openstreetmap-carto.style planet-latest.osm.pbf > /dev/null 2>&1&

No comments:

Post a Comment