I've been trying to use osmosis for importing osm raw data to a db. First, it failed due to lack of sufficient disk space. I made some more space and launched it one more time. That time there was another error and the execution was aborted anyway BUT a huge amount of space was still taken from my hard drive... I had 11 GB before executing an osmosis procedure and now I have like less than 1 GB and it's getting difficult to use the computer anymore. The question is: what files did osmosis create on my disk during the procedure execution and how can I find them and delete them in order to have my disk space back?

I'm using the following osmosis command for import:

"YourPathToOsmosis\bin\osmosis" --read-pbf file="D:\YourPathToOSMFile\osm_file.osm.pbf" --write-pgsql host="localhost" database="yourDBname" user="postgres" password="yourPW"
  • In the realm of GIS, a "huge amount of space" is 6-10 terabytes of free disk (though some larger datasets can fill this easily enough). You haven't stated how large an area you want to work with, but 11Gb isn't usually enough to begin database operations. – Vince Oct 20 '16 at 14:57
  • It's the osm dataset for Poland from geofabrik.de, so 11 GB should have been enough (and it was, because with 11 GB I didn't get that "too little space" error again). I also have another 35 GB on D drive which I wanna move all my work to. Anyway, the question is about how osmosis works with importing data rather than about disk space itself. – Rafak Oct 20 '16 at 15:06
  • Please edit the question to contain this information. – Vince Oct 20 '16 at 15:58
  • 2
    You should also post the exact command line for your osmosis call. I guess you probably mean that your Postgresql database takes up the space. osmosis is just a tool to populate your database and doesn't take up space per se. Also, you should mention what you intend to do with your database (use case). Maybe the way you use osmosis doesn't really fit. – mmd Oct 20 '16 at 16:50

Geofabrik offers compressed files (.pbf and .osm.bz2). The current uncompressed OSM XML file for Poland is 21 GB large.

| improve this answer | |
  • I wonder if this is really relevant. I mean, it all depends on what osmosis is doing with the database, e.g. how tables are populated and if the database or the underlying file system uses compression, etc. – mmd Oct 20 '16 at 17:08
  • Yes, it depends on various factors as described in your other comment. But it seems like he is not aware of the fact that the OSM extracts are usually compressed and that uncompressed data use much more disk space. – scai Oct 20 '16 at 17:50
  • I am aware of that. Now I'm trying to do everything on D drive on which I have 35 GB available. This not the question, though. The question is how to get my space on C disk back. There's no such a large database in the "base" subfolder (where my databases are stored) in the postgres' folder on C. I've also cleaned the disk of temporary files. Any clues? – Rafak Oct 21 '16 at 12:26
  • Use a tool like TreeSize or WinDirStat to find large files and directories. This is off-topic for gis.stackexchange.com though. – scai Oct 21 '16 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.