[Tile-serving] Mod_tile: changing tile cache directory without loosing chache?

Christian Reinstorf cr at crnewmedia.de
Sun Apr 14 10:49:22 UTC 2019


Hi,

I'm trying to change the mod_tile tile directory without loosing tile 
caches but somehow I seem to miss one part.

Setup: standard toolchain with postgres/postgis, mapnik, 
openstreetmap-carto, renderd and mod_tile on an ubuntu 18.04.

Mod_Tile dir had been /var/lib/mod_tile.

The default style has the dir /var/lib/mod_tile/default

with millions of cached tiles in there.

Everything working as it should.

Then I wanted to change the tile cache directory for default style.

This is what I tried:

rsnyced /var/lib/mod_tile to /newdir/var/lib/mod_tile (same owner and 
group as /var/lib/mod_tile)

(without -t flag: all metatiles, etc. get new timestamp)

Touched planet-import-complete with old import time (2 weeks ago) of 
planet in /newdir/var/lib/mod_tile and ../default to reflect older 
import time.

Changed TILEDIR for [default] style in renderd.conf.

Changed ModTileTileDir in apache conf for project.

Reloaded and restarted renderd and apache2.

Problem: mod_tile sends every request for a tile with RenderPrio to 
renderd instead of using cached tiles in new directory structure.

Did I miss sth. or is this the expected behavior? Is there any chance in 
keeping tile cache while moving cache directory?

And why are there two dir conf settings in renderd.conf, on tile_dir 
[renderd] and one TILEDIR (the latter in style config for [default]). I 
did not change tile_dir, only TILEDIR in [default] as I do have other 
styles where the cache should not move.

Thanks & Best Regards,

Chris







More information about the Tile-serving mailing list