]> git.openstreetmap.org Git - nominatim.git/blob - docs/admin/Update.md
add warning about experimental nature of ICU tokenizer
[nominatim.git] / docs / admin / Update.md
1 # Updating the Database
2
3 There are many different ways to update your Nominatim database.
4 The following section describes how to keep it up-to-date using
5 an [online replication service for OpenStreetMap data](https://wiki.openstreetmap.org/wiki/Planet.osm/diffs)
6 For a list of other methods to add or update data see the output of
7 `nominatim add-data --help`.
8
9 !!! important
10     If you have configured a flatnode file for the import, then you
11     need to keep this flatnode file around for updates.
12
13 #### Installing the newest version of Pyosmium
14
15 It is recommended to install Pyosmium via pip. Make sure to use python3.
16 Run (as the same user who will later run the updates):
17
18 ```sh
19 pip3 install --user osmium
20 ```
21
22 #### Setting up the update process
23
24 Next the update needs to be initialised. By default Nominatim is configured
25 to update using the global minutely diffs.
26
27 If you want a different update source you will need to add some settings
28 to `.env`. For example, to use the daily country extracts
29 diffs for Ireland from Geofabrik add the following:
30
31     # base URL of the replication service
32     NOMINATIM_REPLICATION_URL="https://download.geofabrik.de/europe/ireland-and-northern-ireland-updates"
33     # How often upstream publishes diffs (in seconds)
34     NOMINATIM_REPLICATION_UPDATE_INTERVAL=86400
35     # How long to sleep if no update found yet (in seconds)
36     NOMINATIM_REPLICATION_RECHECK_INTERVAL=900
37
38 To set up the update process now run the following command:
39
40     nominatim replication --init
41
42 It outputs the date where updates will start. Recheck that this date is
43 what you expect.
44
45 The `replication --init` command needs to be rerun whenever the replication
46 service is changed.
47
48 #### Updating Nominatim
49
50 The following command will keep your database constantly up to date:
51
52     nominatim replication
53
54 If you have imported multiple country extracts and want to keep them
55 up-to-date, [Advanced installations section](Advanced-Installations.md) contains instructions 
56 to set up and update multiple country extracts.