diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-09-03 23:06:05 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-09-03 23:06:05 +0200 |
commit | afe3cce7fedf962c01d420151bc86b5e34f88888 (patch) | |
tree | 9a224b58e456ad7f1ed596aafb00bcc069b95974 /src/blockchain_utilities/README.md | |
parent | Merge pull request #1039 (diff) | |
parent | fix nigglies, as pointed out by moneromooo-monero (diff) | |
download | monero-afe3cce7fedf962c01d420151bc86b5e34f88888.tar.xz |
Merge pull request #1041
011e42f fix nigglies, as pointed out by moneromooo-monero (Riccardo Spagni)
df63e07 fix remaining bitmonero and simplewallet bits (Riccardo Spagni)
04b120f fix blockchain utilities readme (Riccardo Spagni)
f1d4e4a readme fixes, small Docker fix (Riccardo Spagni)
9a525e0 rename systemd bits to monero (Riccardo Spagni)
011c94c change CMake project name (Riccardo Spagni)
50dc4fb update Dockerfile bitmonero refs (Riccardo Spagni)
Diffstat (limited to 'src/blockchain_utilities/README.md')
-rw-r--r-- | src/blockchain_utilities/README.md | 60 |
1 files changed, 14 insertions, 46 deletions
diff --git a/src/blockchain_utilities/README.md b/src/blockchain_utilities/README.md index 7df6937ad..809df3bfa 100644 --- a/src/blockchain_utilities/README.md +++ b/src/blockchain_utilities/README.md @@ -4,41 +4,24 @@ Copyright (c) 2014-2016, The Monero Project ## Introduction -The blockchain utilities allow one to convert an old style blockchain.bin file -to a new style database. There are two ways to upgrade an old style blockchain: -The recommended way is to run a `blockchain_export`, then `blockchain_import`. -The other way is to run `blockchain_converter`. In both cases, you will be left -with a new style blockchain. - -For importing into the LMDB database, compile with `DATABASE=lmdb` - -e.g. - -`DATABASE=lmdb make release` - -This is also the default compile setting on the master branch. - -The exporter will use the LMDB database as its source. -If you are still using an old style in-memory database (blockchain.bin), you will -have to either resync from scratch, or use an older version of the tools to export -it and import it. +The blockchain utilities allow one to import and export the blockchain. ## Usage: See also each utility's "--help" option. -### Export an existing in-memory database +### Export an existing blockchain database -`$ blockchain_export` +`$ monero-blockchain-export` -This loads the existing blockchain, for whichever database type it was compiled for, and exports it to `$MONERO_DATA_DIR/export/blockchain.raw` +This loads the existing blockchain and exports it to `$MONERO_DATA_DIR/export/blockchain.raw` ### Import the exported file -`$ blockchain_import` +`$ monero-blockchain-import` -This imports blocks from `$MONERO_DATA_DIR/export/blockchain.raw` (exported using the `blockchain_export` tool as described above) -into the current database. +This imports blocks from `$MONERO_DATA_DIR/export/blockchain.raw` (exported using the +`monero-blockchain-export` tool as described above) into the current database. Defaults: `--batch on`, `--batch size 20000`, `--verify on` @@ -47,14 +30,14 @@ Batch size refers to number of blocks and can be adjusted for performance based Verification should only be turned off if importing from a trusted blockchain. If you encounter an error like "resizing not supported in batch mode", you can just re-run -the `blockchain_import` command again, and it will restart from where it left off. +the `monero-blockchain-import` command again, and it will restart from where it left off. ```bash ## use default settings to import blockchain.raw into database -$ blockchain_import +$ monero-blockchain-import ## fast import with large batch size, database mode "fastest", verification off -$ blockchain_import --batch-size 20000 --database lmdb#fastest --verify off +$ monero-blockchain-import --batch-size 20000 --database lmdb#fastest --verify off ``` @@ -77,7 +60,7 @@ stop at block number `--database <database type>#<flag(s)>` -database type: `lmdb, berkeley, memory` +database type: `lmdb, memory` flags: @@ -94,27 +77,12 @@ LMDB flags (more than one may be specified): `nosync, nometasync, writemap, mapasync, nordahead` -BerkeleyDB flags (takes one): - -`txn_write_nosync, txn_nosync, txn_sync` - -``` ## Examples: -$ blockchain_import --database lmdb#fastest -$ blockchain_import --database berkeley#fastest - -$ blockchain_import --database lmdb#nosync -$ blockchain_import --database lmdb#nosync,nometasync -$ blockchain_import --database berkeley#txn_nosync ``` +$ monero-blockchain-import --database lmdb#fastest +$ monero-blockchain-import --database lmdb#nosync -### Blockchain converter with batching -`blockchain_converter` has also been updated and includes batching for faster writes. However, on lower RAM systems, this will be slower than using the exporter and importer utilities. The converter needs to keep the blockchain in memory for the duration of the conversion, like the original bitmonerod, thus leaving less memory available to the destination database to operate. - -Due to higher resource use, it is recommended to use the importer with an exported file instead of the converter. - -```bash -$ blockchain_converter --batch on --batch-size 20000 +$ monero-blockchain-import --database lmdb#nosync,nometasync ``` |