forked from osm2pgsql-dev/osm2pgsql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathosm2pgsql-replication.1
More file actions
183 lines (148 loc) · 4.4 KB
/
Copy pathosm2pgsql-replication.1
File metadata and controls
183 lines (148 loc) · 4.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
.TH osm2pgsql-replication "1" Manual
.SH NAME
osm2pgsql-replication
.SH SYNOPSIS
.B osm2pgsql-replication
[-h] {init,update} ...
.SH DESCRIPTION
Update an osm2pgsql database with changes from a OSM replication server.
.br
.br
This tool initialises the updating process by looking at the import file
.br
or the newest object in the database. The state is then saved in a table
.br
in the database. Subsequent runs download newly available data and apply
.br
it to the database.
.br
.br
See the help of the 'init' and 'update' command for more information on
.br
how to use osm2pgsql\-replication.
.SH OPTIONS
.SS
\fBSub-commands\fR
.TP
\fBosm2pgsql-replication\fR \fI\,init\/\fR
Initialise the replication process.
.TP
\fBosm2pgsql-replication\fR \fI\,update\/\fR
Download newly available data and apply it to the database.
.SH OPTIONS 'osm2pgsql-replication init'
usage: osm2pgsql-replication init [-h] [-q] [-v] [-d DB] [-U NAME] [-H HOST]
[-P PORT] [--prefix PREFIX]
[--osm-file FILE | --server URL]
Initialise the replication process.
.br
.br
There are two ways to initialise the replication process: if you have imported
.br
from a file that contains replication source information, then the
.br
initialisation process can use this and set up replication from there.
.br
Use the command '%(prog)s \-\-osm\-file <filename>' for this.
.br
.br
If the file has no replication information or you don't have the initial
.br
import file anymore then replication can be set up according to
.br
the data found in the database. It checks the planet_osm_way table for the
.br
newest way in the database and then queries the OSM API when the way was
.br
created. The date is used as the start date for replication. In this mode
.br
the minutely diffs from the OSM servers are used as a source. You can change
.br
this with the '\-\-server' parameter.
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Print only error messages
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Increase verboseness of output
.TP
\fB\-d\fR DB, \fB\-\-database\fR DB
Name of PostgreSQL database to connect to or conninfo string
.TP
\fB\-U\fR NAME, \fB\-\-username\fR NAME
PostgreSQL user name
.TP
\fB\-H\fR HOST, \fB\-\-host\fR HOST
Database server host name or socket location
.TP
\fB\-P\fR PORT, \fB\-\-port\fR PORT
Database server port
.TP
\fB\-\-prefix\fR PREFIX
Prefix for table names (default 'planet_osm')
.TP
\fB\-\-osm\-file\fR FILE
Get replication information from the given file.
.TP
\fB\-\-server\fR URL
Use replication server at the given URL (default: https://planet.openstreetmap.org/replication/minute)
.SH OPTIONS 'osm2pgsql-replication update'
usage: osm2pgsql-replication update update [options] [-- param [param ...]]
Download newly available data and apply it to the database.
.br
.br
The data is downloaded in chunks of '\-\-max\-diff\-size' MB. Each chunk is
.br
saved in a temporary file and imported with osm2pgsql from there. The
.br
temporary file is normally deleted afterwards unless you state an explicit
.br
location with '\-\-diff\-file'. Once the database is up to date with the
.br
replication source, the update process exits with 0.
.br
.br
Any additional arguments to osm2pgsql need to be given after '\-\-'. Database
.br
and the prefix parameter are handed through to osm2pgsql. They do not need
.br
to be repeated. '\-\-append' and '\-\-slim' will always be added as well.
.TP
\fBparam\fR
Extra parameters to hand in to osm2pgsql.
.TP
\fB\-\-diff\-file\fR FILE
File to save changes before they are applied to osm2pgsql.
.TP
\fB\-\-max\-diff\-size\fR \fI\,MAX_DIFF_SIZE\/\fR
Maximum data to load in MB (default: 500MB)
.TP
\fB\-\-osm2pgsql\-cmd\fR \fI\,OSM2PGSQL_CMD\/\fR
Path to osm2pgsql command (default: osm2pgsql)
.TP
\fB\-\-once\fR
Run updates only once, even when more data is available.
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Print only error messages
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Increase verboseness of output
.TP
\fB\-d\fR DB, \fB\-\-database\fR DB
Name of PostgreSQL database to connect to or conninfo string
.TP
\fB\-U\fR NAME, \fB\-\-username\fR NAME
PostgreSQL user name
.TP
\fB\-H\fR HOST, \fB\-\-host\fR HOST
Database server host name or socket location
.TP
\fB\-P\fR PORT, \fB\-\-port\fR PORT
Database server port
.TP
\fB\-\-prefix\fR PREFIX
Prefix for table names (default 'planet_osm')
.SH DISTRIBUTION
The latest version of osm2pgsql\-replication may be downloaded from
.UR <<UNSET \-\-url OPTION>>
.UE