Debian Codegraph @

docs/dachs.1

raw
1 .\" Man page generated from reStructuredText.
2 .
3 .
4 .nr rst2man-indent-level 0
5 .
6 .de1 rstReportMargin
7 \\$1 \\n[an-margin]
8 level \\n[rst2man-indent-level]
9 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
10 -
11 \\n[rst2man-indent0]
12 \\n[rst2man-indent1]
13 \\n[rst2man-indent2]
14 ..
15 .de1 INDENT
16 .\" .rstReportMargin pre:
17 . RS \\$1
18 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
19 . nr rst2man-indent-level +1
20 .\" .rstReportMargin post:
21 ..
22 .de UNINDENT
23 . RE
24 .\" indent \\n[an-margin]
25 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
26 .nr rst2man-indent-level -1
27 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
28 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
29 ..
30 .TH "DACHS" "1" "2021-02-04" "2.3"
31 .SH NAME
32 dachs \- data publishing infrastructure for the Virtual Observatory (VO)
33 .SH SYNOPSIS
34 .INDENT 0.0
35 .INDENT 3.5
36 .sp
37 .EX
38 dachs [global\-options] <subcommand> [options] function\-argument ...
39 .EE
40 .UNINDENT
41 .UNINDENT
42 .SH DESCRIPTION
43 .sp
44 dachs provides support for data ingestion and publishing, for metadata
45 handling, and for a variety of VO protocols and standards, e.g. the
46 Table Access Protocol (TAP) or the Simple Cone Search (SCS).
47 .sp
48 There are numerous sub\-commands covering the various tasks (importing,
49 controlling the server, running tests, etc).
50 .sp
51 Subcommand names can be abbreviated to the shortest unique prefix.
52 .sp
53 A centeral concept of DaCHS is the Resource Descriptor (RD), and XML
54 description of a data collection including metadata, ingestion rules,
55 service definitions, and regression tests. They are usually referenced
56 through their RD ids, which are the relative paths from DaCHS\(aq inputs
57 directory to the file containing the RD, with the conventional extension
58 \fB\&.rd\fP stripped. For instance, in a default install, the file
59 \fB/var/gavo/inputs/myrsc/q.rd\fP would have \fBmyrsc/q\fP as RD id.
60 .sp
61 Most commands dealing with RD ids will also pick up RDs if referenced by
62 path; in the example above, if you are in \fB/var/gavo/inputs/myrsc\fP,
63 you could also reference the RD as either \fBq\fP or \fBq.rd\fP\&.
64 .sp
65 Several commands take references to RD elements (table definitions, exec
66 items, direct grammar, etc). These consist of an RD id as just
67 discussed, a hash mark, and the XML id of the target element. Tables
68 have an id automatically, for other elements you may have to add an
69 artificial id.
70 .SH GLOBAL OPTIONS
71 .sp
72 Global options are given before the subcommand name.
73 .INDENT 0.0
74 .TP
75 .B \-\-debug
76 produce debug info as appropriate
77 .TP
78 .B \-\-enable\-pdb
79 run pdb on all errors
80 .TP
81 .B \-h\fP,\fB \-\-help
82 show this help message and exit
83 .TP
84 .B \-\-hints
85 if there are hints on an error, display them
86 .TP
87 .BI \-\-profile\-to\fB= PROFILEPATH
88 enable profiling and write a profile to PROFILEPATH
89 .TP
90 .B \-\-suppress\-log
91 suppress logging of exceptions to the dachs\-specific log files
92 .TP
93 .B \-\-version
94 shows the versions of the software, of the database schema
95 expected by the software and of the database schema actually
96 on disk (if the latter two disagree, run dachs upgrade).
97 .UNINDENT
98 .SH THE ADMIN SUBCOMMAND
99 .sp
100 Synopsis:
101 .INDENT 0.0
102 .INDENT 3.5
103 .sp
104 .EX
105 dachs admin [\-h] subsubfunction [subfunction\-arguments ...]
106 .EE
107 .UNINDENT
108 .UNINDENT
109 .sp
110 This is a somewhat random collection of commands related to
111 administering a data center. In particular, this is where you create
112 and edit accounts.
113 .sp
114 subsubcommands can be abbreviated as long as the abbreviation is
115 unique. For instance \fBdachs adm xsd\fP will do an XSD validation.
116 .sp
117 For more information on the subsubfunctions, pass a \fB\-h\fP flag.
118 .SS Subsubcommands
119 .INDENT 0.0
120 .IP \(bu 2
121 \fBaddtogroup user group\fP \-\- adds a user to a group
122 .IP \(bu 2
123 \fBadduser user password [remarks]\fP \-\- add a user/password pair to
124 the DaCHS user table. DaCHS stores the password in a hashed form, but
125 you may want to clear the shell history (history \-c) after issuing
126 commands like these. And of course, HTTP basic authentication (which
127 is what you get with DaCHS) will transmit username and password
128 essentially in clear text with each request. This may be fine through
129 https, but still: Advise your users to not use valuable passwords with
130 DaCHS sites.
131 .IP \(bu 2
132 \fBchangeuser user password [remarks]\fP \-\- change remarks and/or
133 password for a DC user. See adduser for details.
134 .IP \(bu 2
135 \fBcleantap\fP \-\- remove expired Universal Worker Service (UWS) jobs
136 .IP \(bu 2
137 \fBdelfromgroup user group\fP \-\- remove a user from a group
138 .IP \(bu 2
139 \fBdeluser user\fP \-\- remove a DaCHS user from the user table.
140 .IP \(bu 2
141 \fBdumpDF path\fP \-\- Dumps the source of a file included with the DaCHS
142 distribution. The argument is a package resource path
143 (like /inputs/__system__/scs.rd); for system RDs, the special
144 //rd\-id syntax is supported.
145 .IP \(bu 2
146 \fBexecute exec\-id\fP \-\- Execute the contents of an RD execute element. You
147 must give that element an explicit id in order to make this work; then
148 exec\-id is rd\-id#exec\-id
149 .IP \(bu 2
150 \fBhipsfill [\-d HIPSDIR] svcId\fP \-\- complete the properties file in
151 HIPSDIR with metadata from the service referenced by svcId (e.g.,
152 q#hips).
153 .IP \(bu 2
154 \fBhipsgen dataId minOrder\fP \-\- Write a Hipsgen parameter file for making a
155 HiPS out of the data imported by dataId (e.g., q#import) to stdout.
156 minOrder is the minimal HEALPix order Hipsgen should generate (low
157 orders are computationally expensive!)
158 .IP \(bu 2
159 \fBhashPassword pw\fP \-\- hash a password. adduser and friends already
160 hash themselves, so this is likely only useful for the
161 [web]adminPasswd setting.
162 .IP \(bu 2
163 \fBindexStatements tableRef\fP \-\- show the statements to create the
164 indices on a table. The tableRef has the format RD\-id#table\-id; it
165 is \fInot\fP a database table reference.
166 .IP \(bu 2
167 \fBlistusers\fP \-\- dump the user table
168 .IP \(bu 2
169 \fBmakedelrec ivoid\fP \-\- create a registry record of ivoid saying
170 the resource is removed. This is only necessary when recovering
171 from disasters that made you lose records from DaCHS\(aq internal
172 tables.
173 .IP \(bu 2
174 \fBsuggestucds tableId\fP \-\- Make suggestions for UCDs of the columns
175 of the referenced table (rd\-id#table\-id format) not having one.
176 This is based on their descriptions and uses a GAVO web service.
177 .IP \(bu 2
178 \fBtapabort jobId helpMsg\fP \-\- manually abort a TAP job and return
179 helpMsg to the requesting user as error message.
180 .IP \(bu 2
181 \fBupdateTAPSchema\fP \-\- Update the TAP_SCHEMA metadata for all RDs
182 mentioned in TAP_SCHEMA (deprecated; use dachs imp //tap
183 refresh instead).
184 .IP \(bu 2
185 \fBxsdValidate path\fP \-\- Validate a file against built\-in VO schemas
186 and with built\-in schema validator.
187 .UNINDENT
188 .SH THE CONFIG SUBCOMMAND
189 .sp
190 Synopsis:
191 .INDENT 0.0
192 .INDENT 3.5
193 .sp
194 .EX
195 dachs config [section\-name] config\-key
196 .EE
197 .UNINDENT
198 .UNINDENT
199 .sp
200 This outputs values of DaCHS\(aq configuration to stdout. section\-name
201 defaults to general. This is most commonly used to make external
202 components aware of DaCHS\(aq file locations, e.g., through
203 \fBinputs_dir=$(dachs config inputsDir)\fP\&.
204 .sp
205 See the operator\(aqs guide for a documentation on DaCHS\(aq configuration
206 options.
207 .SH THE DATAPACK SUBCOMMAND
208 .sp
209 Synposis:
210 .INDENT 0.0
211 .INDENT 3.5
212 .sp
213 .EX
214 dachs datapack [\-h] {create,load} ...
215 .EE
216 .UNINDENT
217 .UNINDENT
218 .sp
219 Management of full DaCHS resources in the frictionless data package
220 format. Note that while DaCHS\-created data packages should work as
221 normal data packages, DaCHS can only (automatically) load data packages
222 generated by DaCHS itself \-\- there simply is not enough metadata in
223 generic data packages to produce usable resources.
224 .SS Subsubcommands
225 .SS datapack create
226 .sp
227 Synopsis:
228 .INDENT 0.0
229 .INDENT 3.5
230 .sp
231 .EX
232 dachs datapack create [\-h] id dest
233 .EE
234 .UNINDENT
235 .UNINDENT
236 .sp
237 Positional arguments:
238 .INDENT 0.0
239 .TP
240 .B id
241 Absolute RD id to produce a datapack for
242 .TP
243 .B dest
244 Name of a zip file to dump to
245 .UNINDENT
246 .sp
247 The command creates a data package containing the RD, a README in the
248 resource directory if it exists, auxiliary files (like a booster grammar
249 or a custom core) the RD may have, and all data files that the sources
250 in the RD yield; for collecting these files, \fBsources\fP elements with
251 \fBignoreSources\fP children reading from the database are ignored,
252 because that would make behaviour a bit too unpredictable.
253 .sp
254 To include further files, you can use the datapack\-extrafiles property
255 on the RD. This must contain a json sequence literal with
256 resdir\-relative shell patterns that should be included as well.
257 Non\-existing paths and directories in this list are silently ignored.
258 You cannot include files outside of the resource directory in a data
259 package.
260 .SS datapack load
261 .sp
262 Synopsis:
263 .INDENT 0.0
264 .INDENT 3.5
265 .sp
266 .EX
267 dachs datapack load [\-h] [\-t] [\-\-force] source
268 .EE
269 .UNINDENT
270 .UNINDENT
271 .sp
272 Positional argument:
273 .INDENT 0.0
274 .TP
275 .B source
276 Name of a DaCHS\-produced data package zip file.
277 .UNINDENT
278 .sp
279 Optional arguments:
280 .INDENT 0.0
281 .TP
282 .B \-t\fP,\fB \-\-no\-test
283 Do not run tests after importing.
284 .TP
285 .B \-\-force
286 If the resdir the package declares already exists, remove it
287 before unpacking (rather than bailing out.
288 .UNINDENT
289 .sp
290 This unpacks a DaCHS\-produced data package, imports it, and runs tests
291 on it (which you will want to suppress if you do not have a DaCHS server
292 running locally).
293 .SH THE DROP SUBCOMMAND
294 .sp
295 Synopsis:
296 .INDENT 0.0
297 .INDENT 3.5
298 .sp
299 .EX
300 drop [\-h] [\-s] [\-\-all] rd\-id [dd\-id ...]
301 .EE
302 .UNINDENT
303 .UNINDENT
304 .sp
305 This is the reverse of import: Tables created by a \fBdachs imp\fP with
306 identical arguments are being torn down by \fBdachs drop\fP\&. This will
307 not work reliably if the RD has been modified between the imp and the
308 drop, in particular if the RD has been deleted. In such situations, you
309 can use the \fB\-f\fP flag, which unconditionally tears down everything
310 DaCHS has recorded as coming from the referenced RD.
311 .SS Arguments
312 .INDENT 0.0
313 .TP
314 .B rd\-id
315 RD path or ID to drop
316 .TP
317 .B dd\-id
318 optional data descriptor (DD) ID(s) if you do not
319 want to drop the entire RD; note that no service
320 publications will be undone if you give DD IDs
321 .UNINDENT
322 .SS Options
323 .INDENT 0.0
324 .TP
325 .B \-\-all
326 drop all DDs in the RD, not only the auto ones
327 (overrides manual selection)
328 .TP
329 .B \-s\fP,\fB \-\-system
330 drop tables even if they are system tables
331 .UNINDENT
332 .SH THE DUMP SUBCOMMAND
333 .sp
334 Synopsis:
335 .INDENT 0.0
336 .INDENT 3.5
337 .sp
338 .EX
339 dachs dump [\-h] {load,create,ls} ...
340 .EE
341 .UNINDENT
342 .UNINDENT
343 .sp
344 This is an interface to dumping database tables and inspecting and
345 restoring the generated dumps.
346 .sp
347 This is mainly intended for small to medium tables that are just kept
348 in the database, e.g., DaCHS\(aq administrative tables and the like. For
349 normal user tables, built from science data, doing re\-imports is the
350 recommended way to deal with data loss.
351 .sp
352 In particular, this command is \fInot\fP designed (at this point) for really
353 large tables. For technical reasons (that could be overcome), currently
354 the individual dumps are kept in memory during creation (but not during
355 loading).
356 .sp
357 Before loading, the target tables are dropped if they are already
358 present; note that this will also drop any views they might be part of,
359 as well as any rows that have foreign keys on this table. After
360 loading, indices and primary keys on the restored tables will be
361 recreated, but no scripts or similar are run. Hence, you will have to
362 manually re\-create any dependent resources after a restore.
363 .sp
364 This also means that, for example, restoring a table with products
365 without also restoring //products#products will lose the products that
366 previously were in the restored table from the products table.
367 .SS Subsubcommands
368 .SS dump create
369 .sp
370 Synopsis:
371 .INDENT 0.0
372 .INDENT 3.5
373 .sp
374 .EX
375 dachs dump create [options] dumpFile ids [ids ...]
376 .EE
377 .UNINDENT
378 .UNINDENT
379 .sp
380 Dump one or more tables to DaCHS\(aq dump format. When you pass in RD ids,
381 all onDisk\-tables defined in the RD will be dumped.
382 .sp
383 Positional arguments:
384 .INDENT 0.0
385 .TP
386 .B dumpFile
387 Name of a file to write the dump to; use \- to dump to stderr.
388 .TP
389 .B ids
390 ids of table definitions (as in myres/q#main) or RDs to dump.
391 .UNINDENT
392 .sp
393 Options:
394 .INDENT 0.0
395 .TP
396 .B \-\-text
397 write dumps in text format. You need that when objects in the
398 tables have no binary representation. At least in 2020, that is
399 true for all pgsphere objects.
400 .UNINDENT
401 .SS dump load
402 .sp
403 Synopsis:
404 .INDENT 0.0
405 .INDENT 3.5
406 .sp
407 .EX
408 dachs dump load [\-h] source
409 .EE
410 .UNINDENT
411 .UNINDENT
412 .sp
413 Restore table(s) from a file created by the \fBdump create\fP subcommand
414 before
415 .sp
416 Positional argument:
417 .INDENT 0.0
418 .TP
419 .B source
420 File to restore from. Use \- to restore from stdin.
421 .UNINDENT
422 .SS dump ls
423 .sp
424 Synopsis:
425 .INDENT 0.0
426 .INDENT 3.5
427 .sp
428 .EX
429 dachs dump ls [\-h] source
430 .EE
431 .UNINDENT
432 .UNINDENT
433 .sp
434 List tables and dump metadata from a DaCHS dump.
435 .sp
436 Positional arguments:
437 .INDENT 0.0
438 .TP
439 .B source
440 source file to list
441 .UNINDENT
442 .SH THE GENCOL SUBCOMMAND
443 .sp
444 Synopsis:
445 .INDENT 0.0
446 .INDENT 3.5
447 .sp
448 .EX
449 dachs gencol [\-h] [\-f {fits,vot,viz}] FILE
450 .EE
451 .UNINDENT
452 .UNINDENT
453 .sp
454 The gencol subcommand quickly generates a set of basic column elements
455 for inclusion in RDs. It is particularly convenient together with
456 \fBdachs start\fP\&.
457 .sp
458 This currently understands FITS binary tables, VOTables and Vizier\-Style
459 byte\-by\-byte descriptions (the latter somewhat haphazardly). It assumes
460 there is only one table in each file (and will ignore others in the FITS
461 and VizieR case).
462 .sp
463 It will extract what metadata there is and emit formatted RD XML to
464 stdout; this should work just fine for cut\-and\-paste into <table>
465 elements in RD. Note that usually, important metadata will be missing
466 (e.g., UCDs for FITS and VizieR), and usually data providers are not
467 terribly careful when writing metadata. Hence, you should definitely
468 thoroughly review the elements created before using them in a public
469 service.
470 .sp
471 The program tries to guess the applicable parser from a file name
472 (e.g., README or anything ending in .txt will be treated as
473 Vizier\-like). Where this fails, use the \-f option.
474 .sp
475 For Vizier\-like descriptions, the program also dumps \fBcolDefs\fP
476 material for use in columnGrammar\-s.
477 .SS Argument
478 .INDENT 0.0
479 .TP
480 .B FILE
481 Source file to generate the columns from. This can be
482 a FITS, a VOTable, or Vizier Column\-by\-column
483 description, and DaCHS will guess based on the
484 extension. Use the format option if it guesses wrong.
485 .UNINDENT
486 .SS Options
487 .INDENT 0.0
488 .TP
489 .B \-h\fP,\fB \-\-help
490 show this help message and exit
491 .TP
492 .BI \-f \ FMT\fR,\fB \ \-\-format \ FMT
493 Format of the input table: FITS binary (\fBfits\fP), VOTable (\fBvot\fP), or
494 Vizier byte\-by\-byte (\fBviz\fP)
495 .UNINDENT
496 .SH THE IMPORT SUBCOMMAND
497 .sp
498 Synopsis:
499 .INDENT 0.0
500 .INDENT 3.5
501 .sp
502 .EX
503 dachs import [options] rd\-name [data\-id]
504 .EE
505 .UNINDENT
506 .UNINDENT
507 .sp
508 This subcommand is used to ingest data described by an RD. For special
509 applications, ingestion can be restricted to specific data items within
510 an RD.
511 .SS Options
512 .INDENT 0.0
513 .TP
514 .B \-h\fP,\fB \-\-help
515 show this help message and exit
516 .TP
517 .B \-n\fP,\fB \-\-updateRows
518 Use UPDATE on primary key rather than INSERT with rows
519 inserted to DBTables.
520 .TP
521 .B \-d\fP,\fB \-\-dumpRows
522 Dump raw rows as they are emitted by the grammar.
523 .TP
524 .B \-D\fP,\fB \-\-dumpIngestees
525 Dump processed rows as emitted by the row makers.
526 .TP
527 .B \-R\fP,\fB \-\-redoIndex
528 Drop indices before updating a table and recreate them
529 when done
530 .TP
531 .B \-m\fP,\fB \-\-meta\-only
532 just update table meta (privileges, column
533 descriptions,...).
534 .TP
535 .B \-\-suppress\-meta
536 do not update any metadata (this is likely only useful
537 for updating DDs that already exist).
538 .TP
539 .B \-I\fP,\fB \-\-meta\-and\-index
540 do not import, but update table meta (privileges,
541 column descriptions,...) and recreate the indices.
542 NOTE: This will at the moment \fInot\fP re\-create primary
543 keys because that breaks when there are foreign keys
544 on the table. We do not see a good solution of this at
545 the moment.
546 .TP
547 .B \-s\fP,\fB \-\-system
548 (re\-)create system tables, too
549 .TP
550 .B \-v\fP,\fB \-\-verbose
551 talk a lot while working
552 .TP
553 .B \-r\fP,\fB \-\-reckless
554 Do not validate rows before ingestion
555 .TP
556 .BI \-M\fP,\fB \-\-stop\-after \ MAXROWS
557 Stop after having parsed MAX rows
558 .TP
559 .BI \-b\fP,\fB \-\-batch\-size \ BATCHSIZE
560 deliver N rows at a time to the database.
561 .TP
562 .B \-c\fP,\fB \-\-continue\-bad
563 do not bail out after an error, just skip the current
564 source and continue with the next one.
565 .TP
566 .B \-l\fP,\fB \-\-limits
567 obtain limits for the primary RD of this import. This
568 is basically like running dachs limits on the entire
569 RD. You generally want limits, but while trying things
570 out, you don\(aqt want to spend the extra effort. Use \-l
571 on the \(aqlast\(aq import or perhaps when importing known\-
572 good RDs.
573 .TP
574 .B \-L\fP,\fB \-\-commit\-after\-meta
575 commit the importing transaction after updating the
576 meta tables. Use this when loading large (hence \-L)
577 data sets to avoid keeping a lock on the meta tables
578 for the duration of the input, i.e., potentially days.
579 The price is that users will see empty tables during
580 the import.
581 .TP
582 .B \-\-hide\-adql
583 Interpret adql=True on tables as adql=hidden (this is
584 for fallback mirrors)
585 .UNINDENT
586 .SH THE INFO SUBCOMMAND
587 .sp
588 Synopsis:
589 .INDENT 0.0
590 .INDENT 3.5
591 .sp
592 .EX
593 dachs info [\-h] table\-id
594 .EE
595 .UNINDENT
596 .UNINDENT
597 .sp
598 This displays column statistics about the table referred to in the
599 argument (which must be a fully qualified table name resolvable by the
600 database system).
601 .SS Argument
602 .INDENT 0.0
603 .TP
604 .B table\-id
605 table ID (of the form rdId#tableId)
606 .UNINDENT
607 .SH THE INIT SUBCOMMAND
608 .sp
609 Synopsis:
610 .INDENT 0.0
611 .INDENT 3.5
612 .sp
613 .EX
614 dachs init [\-h] [\-d DSN] [\-\-nodb]
615 .EE
616 .UNINDENT
617 .UNINDENT
618 .sp
619 This initialises DaCHS\(aq file system and database environment. Calling
620 \fBdachs init\fP on an existing site should not damage anything. It
621 might, however, fix things if, for instance, permissions on some
622 directories went funny.
623 .SS Options
624 .INDENT 0.0
625 .TP
626 .BI \-d \ <DSN>\fR,\fB \ \-\-dsn \ <DSN>
627 data source name (DSN) to use to connect to the future DaCHS
628 database; the DSN must let DaCHS connect to the database as an
629 administrator; dbname, host, and port get copied to the
630 profile, if given; this is not required if the calling user
631 has superuser privileges on a database running on localhost.
632 Otherwise, the DSN has to look like \(dqhost=example.org dbname=mydb
633 user=superuser password=secret\(dq.
634 .TP
635 .B \-\-nodb
636 inhibit initialization of the database (you may
637 want to use this when refreshing the file system
638 hierarchy)
639 .UNINDENT
640 .SH THE LIMITS SUBCOMMAND
641 .sp
642 Synopsis:
643 .INDENT 0.0
644 .INDENT 3.5
645 .sp
646 .EX
647 dachs limits [\-h] [\-t] [\-s P] [\-d] itemId [itemId ...]
648 .EE
649 .UNINDENT
650 .UNINDENT
651 .sp
652 This creates or updates DaCHS\(aq estimates of various metadata of RDs
653 or tables, in particular the STC coverage, the size of the tables and,
654 unless \fB\-t\fP is given, the column statistics. This may take a long
655 time for large tables, in which case you may use the
656 \fB\-\-sample\-percent\fP option, which makes DaCHS only look at a subset
657 of the full data.
658 .sp
659 When running \fBdachs limits\fP on an RD, it will skip views under the
660 assumption that in the typical case, column metadata for the
661 interesting columns will already have been obtained for the source
662 tables. For views for which this is assumption is wrong, set the
663 forceStats property to True.
664 .sp
665 You should in general run \fBdachs limits\fP before publishing a resource.
666 .SS Arguments
667 .INDENT 0.0
668 .TP
669 .B itemId
670 either an RD id or a table reference in the from rd\-id#table\-id.
671 A single ALL will expand to all RDs that already have limits\-obtained
672 metadata.
673 .UNINDENT
674 .SS Options
675 .INDENT 0.0
676 .TP
677 .B \-t\fP,\fB \-\-tables\-only
678 Only acquire table/resource\-level metadata (rather than column
679 metadata, which usually takes a lot longer).
680 .TP
681 .BI \-s \ P\fR,\fB \ \-\-sample\-percent \ P
682 Only look at P percent of the table to determine min/max/mean.
683 .TP
684 .B \-d\fP,\fB \-\-dump
685 Do not obtain statistics but rather dump the results of the
686 last run
687 .UNINDENT
688 .SH THE MKBOOST SUBCOMMAND
689 .sp
690 Synopsis:
691 .INDENT 0.0
692 .INDENT 3.5
693 .sp
694 .EX
695 dachs mkboost [option] <id\-of\-directGrammar>
696 .EE
697 .UNINDENT
698 .UNINDENT
699 .sp
700 This writes a C source skeleton for using the direct grammar referenced
701 to fill a database table. See the \fIGuide to Write Booster Grammars\fP in
702 the DaCHS documentation for how to use this command.
703 .SS Options
704 .INDENT 0.0
705 .TP
706 .B \-b\fP,\fB \-\-binary
707 generate a skeleton for a binary parser
708 .TP
709 .BI \-s \ <SPLITTER>\fR,\fB \ \-\-splitter\fB= <SPLITTER>
710 generate a split skeleton with split string
711 <SPLITTER>
712 .UNINDENT
713 .SH THE MKRD SUBCOMMAND
714 .sp
715 Synopsis:
716 .INDENT 0.0
717 .INDENT 3.5
718 .sp
719 .EX
720 dachs mkrd [option] sample
721 .EE
722 .UNINDENT
723 .UNINDENT
724 .sp
725 Rudimentary support for generating RDs from data. This was probably
726 a bad idea. Better use dachs start.
727 .SS Options
728 .INDENT 0.0
729 .TP
730 .BI \-f \ <SRCFORM>\fR,\fB \ \-\-format\fB= <SRCFORM>
731 source format: FITS or VOT; default: detected from
732 file name
733 .TP
734 .BI \-t \ <TABLENAME>\fR,\fB \ \-\-table\-name\fB= <TABLENAME>
735 name of the generated table
736 .UNINDENT
737 .SH THE PUBLISH SUBCOMMAND
738 .sp
739 Synopsis:
740 .INDENT 0.0
741 .INDENT 3.5
742 .sp
743 .EX
744 dachs pub [\-h] [\-a] [\-m] [\-k] [\-u] rd [rd ...]
745 .EE
746 .UNINDENT
747 .UNINDENT
748 .sp
749 This marks data and/or services contained in an RD as published; this
750 will make them displayed in DaCHS\(aq portal page or pushed to the VO
751 registry through DaCHS\(aq OAI\-PMH endpoint. See the \fIOperator\(aqs Guide\fP
752 for details.
753 .SS Arguments
754 .INDENT 0.0
755 .TP
756 .B rd
757 RDs to publish; you can give ids or file paths. Use
758 the magic value ALL to check all published RDs,
759 ALL_RECURSE to look for RDs in the file system (check
760 twice for detritus before doing that later thing).
761 .UNINDENT
762 .SS Options
763 .INDENT 0.0
764 .TP
765 .B \-k\fP,\fB \-\-keep\-timestamps
766 Preserve the time stamp of the last record modification. This may
767 sometimes be desirable with minor updates to an RD that don\(aqt
768 justify a re\- publication to the VO.
769 .TP
770 .B \-u\fP,\fB \-\-unpublish
771 Unpublish all resources coming from this RD Note that this will in
772 general create \(dqdeleted records\(dq, i.e., essentially empty resource
773 records only stating that the resource referenced by an identifier
774 is no longer available. This is important for reliable operation
775 in the presence of incremental harvesting.
776 .UNINDENT
777 .SH THE PURGE SUBCOMMAND
778 .sp
779 Synopsis:
780 .INDENT 0.0
781 .INDENT 3.5
782 .sp
783 .EX
784 dachs purge [\-h] tablename [tablename...]
785 .EE
786 .UNINDENT
787 .UNINDENT
788 .sp
789 This will delete tables in the database and also remove their metadata
790 from DaCHS\(aq internal tables (e.g., TAP_SCHEMA, table of published
791 records). Use this if \fBdachs drop\fP fails for to remove some table for
792 one reason or another.
793 .SS Argument
794 .INDENT 0.0
795 .TP
796 .B tablename
797 (SQL) name of the table to drop, including the schema name
798 .UNINDENT
799 .SH THE SERVE SUBCOMMAND
800 .sp
801 Synopsis:
802 .INDENT 0.0
803 .INDENT 3.5
804 .sp
805 .EX
806 dachs serve [\-h] {debug | reload | restart | start | stop}
807 .EE
808 .UNINDENT
809 .UNINDENT
810 .sp
811 This exposes various functionality for managing DaCHS\(aq server component.
812 While these usually are being called through init scripts or systemd
813 components, the \fBdebug\fP subfunction is very convenient during service
814 development off the production environment.
815 .sp
816 \fBserve start\fP, \fBstop\fP, and \fBrestart\fP manage a PID file, which
817 DaCHS does not do when running under systemd. Hence, do \fInot\fP use these
818 subcommands when systemd manages your DaCHS. expireRD is fine, though.
819 .SS Subsubcommands
820 .INDENT 0.0
821 .IP \(bu 2
822 \fBdebug\fP \-\- run a server and remain in the foreground, dumping all
823 kinds of stuff to the terminal. If you have an SSL certificate, this
824 will try bind an https interface to port 40443; that\(aqs exclusively
825 for little experiments, do not use it for actual operations.
826 .IP \(bu 2
827 \fBreload\fP \-\- reload server configuration (incomplete)
828 .IP \(bu 2
829 \fBrestart\fP \-\- restart the server
830 .IP \(bu 2
831 \fBstart\fP \-\- start the server and put it in the background
832 .IP \(bu 2
833 \fBstop\fP \-\- stop a running server
834 .IP \(bu 2
835 \fBexpireRD <rdId>\fP \-\- forget the cached RD in the running server.
836 While in general, DaCHS reloads an RD if it finds it changed,
837 sometimes it does not realise some dependency has changed. In that
838 case, this subsubcommand can expunge the RD so it will be re\-parsed
839 when the next access occurs. Note that this requires
840 [web]adminpasswd be set; the command uses [web]serverURL to figure
841 out where to connect the running server.
842 .UNINDENT
843 .sp
844 The \fBstart\fP subcommand accepts a \fB\-\-foreground/\-f\fP option. If you pass
845 it, the server will not double\-detach and not redirect stderr to a log
846 file and instead stay in the foreground; it will also not check for PID
847 files or create them. In contrast to \fBdebug\fP, it
848 will change users, etc., and not put the DaCHS into debug mode.
849 This option is primarily useful for systemd units.
850 .SH THE START SUBCOMMAND
851 .sp
852 Synopsis:
853 .INDENT 0.0
854 .INDENT 3.5
855 .sp
856 .EX
857 dachs start [\-h] (list|<data\-type\-tag>)
858 .EE
859 .UNINDENT
860 .UNINDENT
861 .sp
862 The start subcommand generates a template RD for a certain type of data
863 that you can then fill out. The data\-type\-tag can be something like scs
864 (for catalogs), siap (for images), or ssap (for spectra). Pass \fBlist\fP
865 to see what is available.
866 .sp
867 The template uses the name of current directory as resdir and schema
868 name. That means that if starting a data collection, you should create
869 its resdir as a child of GAVO_ROOT/inputs and execute \fBdachs start\fP in
870 that dicrectory.
871 .sp
872 To fill out the template RD, load it into a text editor and, ina first
873 go, search for the pattern %.*%. You should see enough hints from what
874 is between the percent signs and the environment to get a reasonable
875 shot at filling things out. Then reead the comments; very typcially,
876 you can get an extremely basic data publication without that, but a good
877 service will normally require some extra work beyond filling things out.
878 .SS Argument
879 .INDENT 0.0
880 .TP
881 .B data\-type\-tag
882 A short identifier for a data type. Pass \fBlist\fP here to see a
883 list of known tags and their meanings.
884 .UNINDENT
885 .SH THE TEST SUBCOMMAND
886 .sp
887 Synopsis:
888 .INDENT 0.0
889 .INDENT 3.5
890 .sp
891 .EX
892 dachs test [\-h] [\-v] [\-V] [\-d] [\-t TAG] [\-R N] [\-T SECONDS] [\-D FILE]
893 [\-w SECONDS] [\-u SERVERURL] [\-n NTHREADS]
894 [\-\-seed RANDOMSEED] [\-k KEYWORDS]
895 id
896 .EE
897 .UNINDENT
898 .UNINDENT
899 .sp
900 This runs regression tests embedded in the whatever is reference by id
901 (can be an RD, a regression suite, or a single regression test). For
902 details, see the chapter on \fIregression testing\fP in the \fIDaCHS Reference
903 Manual\fP\&.
904 .SS Argument
905 .INDENT 0.0
906 .TP
907 .B id
908 RD id or cross\-RD identifier for a testable thing. Write ALL here
909 to have DaCHS search and test all RDs in the inputs, ignoring those
910 in or below directories with a file named DACHS_PRUNE.
911 .UNINDENT
912 .SS Options
913 .INDENT 0.0
914 .TP
915 .B \-h\fP,\fB \-\-help
916 show this help message and exit
917 .TP
918 .B \-v\fP,\fB \-\-verbose
919 Talk while working
920 .TP
921 .B \-d\fP,\fB \-\-dump\-negative
922 Dump the content of failing tests to stdout
923 .TP
924 .BI \-t \ TAG\fR,\fB \ \-\-tag \ TAG
925 Also run tests tagged with TAG.
926 .TP
927 .BI \-R \ N\fR,\fB \ \-\-n\-repeat \ N
928 Run each test N times
929 .TP
930 .BI \-T \ SECONDS\fR,\fB \ \-\-timeout \ SECONDS
931 Abort and fail requests after inactivity of SECONDS
932 .TP
933 .BI \-D \ FILE\fR,\fB \ \-\-dump\-to \ FILE
934 Dump the content of last failing test to FILE
935 .TP
936 .BI \-w \ SECONDS\fR,\fB \ \-\-wait \ SECONDS
937 Wait SECONDS before executing a request
938 .TP
939 .BI \-u \ SERVERURL\fR,\fB \ \-\-serverURL \ SERVERURL
940 URL of the DaCHS root at the server to test
941 .TP
942 .BI \-n \ NTHREADS\fR,\fB \ \-\-number\-par \ NTHREADS
943 Number of requests to be run in parallel
944 .TP
945 .BI \-k \ KEYWORDS\fR,\fB \ \-\-keywords \ KEYWORDS
946 Only run tests with descriptions containing all
947 (whitespace\-separated) keywords. Sequential tests will
948 be run in full, nevertheless, if their head test
949 matches.
950 .UNINDENT
951 .SH THE VALIDATE SUBCOMMAND
952 .sp
953 Synopsis:
954 .INDENT 0.0
955 .INDENT 3.5
956 .sp
957 .EX
958 dachs validate [\-h] [\-x] [\-v] rd [rd...]
959 .EE
960 .UNINDENT
961 .UNINDENT
962 .sp
963 This checks RDs for well\-formedness and some aspects of VO\-friendliness
964 .SS Arguments
965 .INDENT 0.0
966 .TP
967 .B rd
968 RD path or ID to validate. Write ALL here to have DaCHS search
969 and validate all RDs in your input and validate them, ignoring those
970 in or below directories with a file named DACHS_PRUNE.
971 .UNINDENT
972 .SS Options
973 .INDENT 0.0
974 .TP
975 .B \-h\fP,\fB \-\-help
976 show this help message and exit
977 .TP
978 .B \-p\fP,\fB \-\-pre\-publication
979 Validate as if all services were IVOA published even
980 if they are not (this may produce spurious errors if
981 unpublished services are in the RD).
982 .TP
983 .B \-v\fP,\fB \-\-verbose
984 Talk while working
985 .TP
986 .B \-t\fP,\fB \-\-run\-tests
987 Run regression tests embedded in the checked RDs
988 .TP
989 .BI \-T \ SECONDS\fR,\fB \ \-\-timeout \ SECONDS
990 When running tests, abort and fail requests after
991 inactivity of SECONDS
992 .TP
993 .B \-c\fP,\fB \-\-compare\-db
994 Also make sure that tables that are on disk (somewhat)
995 match the definition in the RD.
996 .UNINDENT
997 .SH THE UPGRADE SUBCOMMAND
998 .sp
999 Synopsis:
1000 .INDENT 0.0
1001 .INDENT 3.5
1002 .sp
1003 .EX
1004 dachs upgrade
1005 .EE
1006 .UNINDENT
1007 .UNINDENT
1008 .sp
1009 Each DaCHS version has an associated database schema version, encoding
1010 the structure of DaCHS\(aq (and the implemented protocol versions\(aq) ideas of
1011 how system and user tables should look like. \fBdachs upgrade\fP attempts
1012 to work out how to change the database to match the expectations of the
1013 current version and executes the respective code. It will not touch
1014 its data structures if it decrees that the installation is up to date.
1015 .sp
1016 Operating system packages will usually try to run \fBdachs upgrade\fP as
1017 part of their management operation. In case \fBdachs upgrade\fP requires
1018 manual intervention, this may fail, in which case operators may need to
1019 call \fBdachs upgrade\fP manually.
1020 .sp
1021 Operators keeping a manually installed DaCHS should run \fBdachs upgrade\fP
1022 after each \fBsvn update\fP or update from tar.
1023 .sp
1024 \fBdachs upgrade\fP cannot perform actions requiring superuser privileges,
1025 since none of its roles have those. Currently, this is mainly updating
1026 postgres extensions DaCHS uses (if you use extra ones, you can configure
1027 DaCHS\(aq watch list in [db]managedExtensions). \fBdachs upgrade \-e\fP will
1028 attempt to figure out the instructions necessary to update extensions
1029 and write them to stdout. Hence, operators should execute something
1030 like \fBdachs upgrade \-e | psql gavo\fP from a database superuser account
1031 after upgrading postgres extensions.
1032 .SS Options
1033 .INDENT 0.0
1034 .INDENT 3.5
1035 .INDENT 0.0
1036 .TP
1037 .BI \-\-force\-dbversion \ FORCEDBVERSION
1038 assume this as the database\(aqs schema version. If you
1039 don\(aqt develop DaCHS, you almost certainly should stay
1040 clear of this flag
1041 .TP
1042 .B \-e\fP,\fB \-\-get\-extension\-script
1043 Dump a script to update DaCHS\-managed extensions (will
1044 print nothing if no extensions need updating). This
1045 will return 0 if material was written, 1 otherwise.
1046 .TP
1047 .B \-t\fP,\fB \-\-update\-tap\-schema
1048 Update the TAP schema, i.e., re\-read all the
1049 metadata from the TAP\-published tables. This
1050 isn\(aqt really related to upgrading, but it is
1051 generally a good idea to sync on\-disk
1052 representations with what you may have edited in
1053 the RDs.
1054 .UNINDENT
1055 .UNINDENT
1056 .UNINDENT
1057 .SH THE ADQL SUBCOMMAND
1058 .sp
1059 Synopsis:
1060 .INDENT 0.0
1061 .INDENT 3.5
1062 .sp
1063 .EX
1064 dachs adql query
1065 .EE
1066 .UNINDENT
1067 .UNINDENT
1068 .sp
1069 This subcommand executes ADQL queries locally and writes the resulting
1070 VOTable to stdout. We consider removing it.
1071 .SH INTERNAL OR DEPRECATED SUBCOMMANDS
1072 .sp
1073 The subcommands \fBshow\fP, \fBstc\fP are deprecated and not documented
1074 here. They may disappear without further notice.
1075 .sp
1076 the subcommands \fBtaprun\fP, \fBdlrun\fP, \fBuwsrun\fP, \fBgendoc\fP, \fBraise\fP
1077 are used internally and should not be directly used by DaCHS operators.
1078 .SH REPORTING BUGS
1079 .sp
1080 To report bugs and request support, please use our support mailing
1081 list <http://lists.g\-vo.org/cgi\-bin/mailman/listinfo/dachs\-support> \&.
1082 .SH SEE ALSO
1083 .sp
1084 Comprehensive, if always incomplete documentation on DaCHS is available
1085 in several documents available at <http://docs.g\-vo.org/DaCHS/>
1086 (upstream site with PDF downloads and the formatted reference
1087 documentation) and <http://dachs\-doc.readthedocs.io/en/latest/index.html>
1088 (with facilities for updating the documents).
1089 .SH COPYRIGHT
1090 .sp
1091 Copyright © 2017 The GAVO project. License GPLv3+: GNU
1092 GPL version 3 or later < <http://gnu.org/licenses/gpl.html> >.
1093 This is free software: you are free to change and redistribute it.
1094 There is NO WARRANTY, to the extent permitted by law.
1095 .SH AUTHOR
1096 Markus Demleitner <[email protected]>
1097 .\" Generated by docutils manpage writer.
1098 .