@@ -103,7 +103,7 @@ The `-d` parameter tells the replication script which database to connect
103103to. The script also supports all other parameters mentioned in the section
104104[ database connection] ( #database-connection ) including
105105[ libpq environment variables] ( https://www.postgresql.org/docs/current/libpq-envars.html ) .
106- The only exception is the '-W' parameter for interactive password prompts.
106+ The only exception is the ` -W ` parameter for interactive password prompts.
107107When you need to supply a password, always use a
108108[ pgpass file] ( https://www.postgresql.org/docs/current/libpq-pgpass.html ) .
109109
@@ -115,7 +115,8 @@ the replication information.
115115By default the update server and interval will be set from the file headers,
116116for planet dumps minutely updates from the OSM main servers will be used. If
117117you want to use a different replication service, use the ` --server `
118- parameter.
118+ parameter. You can also use ` --osm-file <osm-file> ` to retrieve the update
119+ server from a data file.
119120
120121It is safe to repeat initialisation at any time. For example, when you want
121122to change the replication service, simply run the init command again with a
@@ -129,10 +130,11 @@ Fetching updates is as simple as running:
129130
130131This fetches data from the replication service, saves it in a temporary file
131132and calls osm2pgsql with the given parameters to apply the changes. Note that
132- osm2pgsql-replication makes sure to only fetch a limited amount of data at the
133+ osm2pgsql-replication makes sure to only fetch a limited amount of data at a
133134time to make sure that it does not use up too much RAM. If more data is
134135available it will repeat the download and call of osm2pgsql until the database
135- is up to date. You can change the amount of data downloaded at once with
136+ is up to date. Use the option ` --once ` to stop after the first change file has
137+ been applied. You can change the amount of data downloaded at a time with
136138` --max-diff-size ` , the default is 500MB.
137139
138140Sometimes you need to run additional commands after osm2pgsql has updated the
@@ -141,6 +143,12 @@ option `--post-processing` to give osm2pgsql-replication a script it is
141143supposed to run after each call to osm2pgsql. Note that if the script fails,
142144then the entire update process is considered a failure and aborted.
143145
146+ You can use the option ` --diff-file <file> ` to specify a file where osm2pgsql-replication
147+ will save the changes before they are applied to the database.
148+
149+ After the update has finished, osm2pgsql-replication can run a script specified
150+ by the option ` --post-processing <script> ` .
151+
144152##### Putting it all together with systemd
145153
146154osm2pgsql-replication works well as a systemd service that keeps your database
0 commit comments