hs-init-backend - HammerServer back end initialization script


 hs-init-backend go


The HammerServer supports a number of back end types (flat file, database, CouchDb) and per type, an initialization is needed when the back end storage is used for the first time.

All initializations have in common that a first record is inserted into the storage, with as data the string "Chain start". The entry is cryptographically signed (just as any other data entry), but its "previous entry" column points to itself. All subsequent entries will have as their previous entry an already existing record, thereby forming a chain. The first record simply loops to itself and is created to start the chain.

Specific back end types require extra initialization: e.g., hs-init-backend creates a CouchDb database when required, and also creates a data view.

hs-init-backend can be re-run without problems on an already initialized back end: its initializations are only performed when required, and not repeated. Nevertheless an argument "go" is required before hs-init-backend performs its action.


hs-init-backend relies on the configuration file etc/hammerserver.cfg to determine the back end type, database location and so on.


The tamper-resistant server, its control script, and the documentation were written by Karel Kubat / Copyright (c) 2009 ff. Distributed under GPLV3.