[GIS] mod_tile: how to avoid cache expiry during DB rebuild

mod-tileopenstreetmap

I'm running an OSM tile server with the default stack (mapnik, tirex, mod_tile, apache).
Since I need only specific areas, I usually pre-render all tiles.
Now I want to rebuild the Postgres DB bcs of a schema change (in order to satisfy specific style requirements). How can I avoid tiles requests to fail during that time because of mod_tile cache expiration policy? I'm using the default mod_tile config and don't yet know much about it.

Best Answer

I think I found a better way then the proposed ones (better because easier and less invasive): If the file /var/lib/mod_tile/planet-import-complete exists, its modification timestamp determines if cached tiles can expire or not. If the file timestamp is older then the cached tiles, they will not be regenerated.

According to this posting by Frederik mod_tile assumes the DB data is 3 days old if this file is missing.

Hint: The touch command has a parameter -t for manually setting the timestamp (in my case into the past)

I found out reading http://switch2osm.org/serving-tiles/building-a-tile-server-from-packages/