Home | Trees | Indices | Help |
|
---|
|
DaCHS supports dump/restore operations on tables or set of tables. This module implements the underlying file format and some utilities.
The file format itself is a tar.gz file with an index.txt consisting of lines
file_name table-id
followed by the files. Table id is DaCHS's usual rd-id#table-id. The files contain binary dump material.
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Variables | |
__package__ =
|
Function Details |
parses our index.txt file format and returns (member-name, table-id) tuples. srcFile is an open file, probably from TarFile.extractfile. If you change the index file format, you'll have to change this and the corresponding code in createDump. |
iterates over dbtable objects referenced by objectId. objectId can reference a table def or an RD (in which case all onDisk tables from it are returned). Or it can be a table already. |
returns a list of validated dbtables of all tableIds. This will raise an exception if any table id or database table doesn't exist, or if the on-disk schema doesn't match the definition. For convenience in internal use, tableIds that already are table instances will not be touched. That's a bit tricky, though, because you can have data from different transactions when you do that. |
writes a DaCHS dump of tableIds to destFile. tableIds is a list of rd-id#table-id identifiers (all must resolve), destFile is a file object opened for writing. |
iterates over table info tuples from an open dump file. Each tuple has the member name, the table id, a boolean whether the table definion is accessible, the UTC unix time the dump was made, and the size of the dump. |
restores a dump. dumpFile is an open file object containing a file crated by createDump. This comprises recrating all mentioned tables, copying in the associated data, and re-creating all indices. Each table is handled in a separate transaction, we do not stop if a single restore has failed. |
|
|
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |