Skip to content

Commit 69c68b5

Browse files
committed
doc: document the messages generated from import/export
The numbers reported when exporting/importing don't make sense unless you know how they are generated and used. Document that. Norbert Schlemmer asked about it while debugging an import issue with postgresql. So document it since I did the work.
1 parent c56d29e commit 69c68b5

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

doc/admin_guide.txt

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,73 @@ Also the tautological::
14751475
Remember the roundup commands that accept multiple designators accept
14761476
them ',' separated so using '-dc' is almost always required.
14771477

1478+
A Note on Import and Export
1479+
---------------------------
1480+
1481+
This is a little in the weeds, but I have noticed this and was asked
1482+
about it so I am documenting it for the future.
1483+
1484+
Running ``roundup-admin`` with ``-V`` to get additional info when
1485+
importing/exporting the tracker generates three types of messages.
1486+
1487+
For example::
1488+
1489+
$ roundup-admin -i tracker -V export ./myExport
1490+
Exporting priority - 5
1491+
Exporting Journal for priority
1492+
Exporting status - 1
1493+
Exporting Journal for status
1494+
[...]
1495+
1496+
1497+
$ roundup-admin -i tracker -V import ./myExport
1498+
Importing priority - 7
1499+
setting priority 8
1500+
Importing status - 8
1501+
setting status 9
1502+
[...]
1503+
1504+
Note the numbers for status. Exported ends up at 1, Imported ends up
1505+
at 8 and setting chooses 9. These numbers are derived differently and
1506+
used differently. You can't directly compare them.
1507+
1508+
``Exporting issue - XXX``:
1509+
1510+
``XXX`` is the id number of the node being exported/processed from
1511+
the database. The order is determined by sorting by the key of the
1512+
class (as set by sortkey). If the class key is 'id', then it's a
1513+
string sort so '9' comes before '1009'. You might notice if the
1514+
export is slow the numbers jumping around.
1515+
1516+
It does not usually end up as the total number of nodes
1517+
exported. However if it crashes, you know what node it was
1518+
processing at the time.
1519+
1520+
In the example above, the status node with id 1 was the last one
1521+
when sorted alphabetically by name.
1522+
1523+
``Importing <class> - XXX``:
1524+
1525+
``XXX`` is the number of the node (not the node id) being
1526+
imported/currently processed at line XXX+1 in the file. It is an
1527+
incrementing number starting at 0 and never jumps around. Value 0
1528+
is consumed when reading the header and not displayed. The final
1529+
value is the same as the number of objects and one less then the
1530+
number of lines in the file. If it crashes, you were processing
1531+
the line at XXX+1.
1532+
1533+
``setting <class> XXX``:
1534+
1535+
``XXX`` in the setting line should always be one more than the
1536+
number of imported objects. The setting value is the id for the
1537+
next created object of that type. So in theory the Importing
1538+
number should be one less than the setting number.
1539+
1540+
However under certain circumstances, Roundup can skip an id
1541+
number. This can lead to a difference of more than 1 between the
1542+
Importing and setting numbers. It's not a problem. However setting
1543+
can (and must) always be higher than the Importing number.
1544+
14781545

14791546
.. _`customisation documentation`: customizing.html
14801547
.. _`reference documentation`: reference.html

0 commit comments

Comments
 (0)