Bootstrap AptosDB from a Backup

Enables users to load from a backup to catch their node's DB up to a known state.


movement aptos node bootstrap-db [OPTIONS] <--local-fs-dir <LOCAL_FS_DIR>|--command-adapter-config <COMMAND_ADAPTER_CONFIG>>


  • --local-fs-dir <LOCAL_FS_DIR> Select the LocalFs backup storage type, which is used mainly for tests.

  • --command-adapter-config <COMMAND_ADAPTER_CONFIG> Select the CommandAdapter backup storage type, which reads shell commands with which it communicates with either a local file system or a remote cloud storage. Compression or other filters can be added as part of the commands. See a sample config (

  • --metadata-cache-dir <DIR> Metadata cache dir. If specified and shared across runs, metadata files in cache won't be downloaded again from backup source, speeding up tool boot up significantly. Cache content can be messed up if used across the devnet, the testnet, and the mainnet. Defaults to temporary dir.

  • --replay-all Replay all transactions, don't try to use a state snapshot.

  • --ledger-history-start-version <LEDGER_HISTORY_START_VERSION> Ignore restoring the ledger history (transactions and events) before this version if possible. Set 0 for full ledger history. Defaults to only start ledger history after selected state snapshot.

  • --skip-epoch-endings Skip restoring epoch ending info, used for debugging.

  • --dry-run Dry run without writing data to DB.

  • --target-db-dir <DB_DIR>

  • --target-version <TARGET_VERSION> Content newer than this version will not be recovered to DB, defaulting to the largest version possible, meaning recover everything in the backups.

  • --trust-waypoint <TRUST_WAYPOINT> (multiple) When provided, an epoch ending LedgerInfo at the waypoint version will be checked against the hash in the waypoint, but signatures on it are NOT checked. Use this for two purposes:

    1. Set the genesis or the latest waypoint to confirm the backup is compatible.

    2. Set waypoints at versions where writeset transactions were used to overwrite the validator set, so that the signature check is skipped. N.B. LedgerInfos are verified only when restoring / verifying the epoch ending backups, i.e. they are NOT checked at all when doing one-shot restoring of the transaction and state backups.

  • --concurrent-downloads <CONCURRENT_DOWNLOADS> Number of concurrent downloads from the backup storage. This covers the initial metadata downloads as well. Speeds up remote backup access. Defaults to number of CPUs.

  • --replay-concurrency-level <REPLAY_CONCURRENCY_LEVEL> concurrency_level used by the transaction executor, applicable when replaying transactions after a state snapshot. Defaults to number of CPUs.

Last updated