Skip to content

Commit

Permalink
Merge pull request #2201 from graydon/meta-data-snapshot-admin-guide-…
Browse files Browse the repository at this point in the history
…note

docs: add note to admin guide about snapshotting databases post meta-data generation.
  • Loading branch information
MonsieurNicolas committed Jul 18, 2019
2 parents 2d247a3 + 4fc5efb commit ffd23e4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/software/admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,17 @@ By default, stellar-core will perform this automatic maintenance, so be sure to

If you need to regenerate the meta data, the simplest way is to replay ledgers for the range you're interested in after (optionally) clearing the database with `newdb`.

##### Meta data snapshots and restoration

Some deployments of stellar-core and Horizon will want to retain meta data for the _entire history_ of the network. This meta data can be quite large and computationally expensive to regenerate anew by replaying ledgers in stellar-core from an empty initial database state, as described in the previous section.

This can be especially costly if run more than once. For instance, when bringing a new node online. Or even if running a single node with Horizon, having already ingested the meta data _once_: a subsequent version of Horizon may have a schema change that entails re-ingesting it _again_.

Some operators therefore prefer to shut down their stellar-core (and/or Horizon) processes and _take filesystem-level snapshots_ or _database-level dumps_ of the contents of stellar-core's database and bucket directory, and/or Horizon's database, after meta data generation has occurred the first time. Such snapshots can then be restored, putting stellar-core and/or Horizon in a state containing meta data without performing full replay.

Any reasonably-recent state will do -- if such a snapshot is a little old, stellar-core will replay ledgers from whenever the snapshot was taken to the current network state anyways -- but this procedure can greatly accelerate restoring validator nodes, or cloning them to create new ones.


#### Buckets
Stellar-core stores a duplicate copy of the ledger in the form of flat XDR files
called "buckets." These files are placed in a directory specified in the config
Expand Down

0 comments on commit ffd23e4

Please sign in to comment.