BTM - Blockchain Time Machine.

Related tags

Cryptography BTM
Overview

GitHub top language GitHub issues GitHub pull requests

BTM

Blockchain Time Machine.

BTM is an incremental data backup mechanism that does not require downtime.

Why would you need this?

btm will give you the following abilities or advantages:

  • fall back to the data state of a desired block height instantly
  • the atomicity of snapshot data can be guaranteed
  • hot backup during operation, no downtime is needed
  • based on OS-level infrastructure, stable and reliable
  • very small resource usage, almost no performance damage
  • ...

User Instructions

Usage of btm ...:

btm

USAGE:
    btm [FLAGS] [OPTIONS] [SUBCOMMAND]

FLAGS:
    -h, --help                 Prints help information
    -C, --snapshot-clean       clean up all existing snapshots
    -l, --snapshot-list        list all available snapshots in the form of block height
    -x, --snapshot-rollback    rollback to the last available snapshot
    -V, --version              Prints version information

OPTIONS:
    -r, --snapshot-rollback-to <Height>
            rollback to a custom height, will try the closest smaller height if the target does not exist

    -R, --snapshot-rollback-to-exact <Height>
            rollback to a custom height exactly, an error will be reported if the target does not exist

    -p, --snapshot-target <TargetPath>           a data volume containing both ledger data and tendermint data

SUBCOMMANDS:
    daemon
    help      Prints this message or the help of the given subcommand(s)

Usage of btm daemon ...:

btm-daemon

USAGE:
    btm daemon [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -a, --snapshot-algo <Algo>            fair/fade, default to `fair`
    -c, --snapshot-cap <Capacity>         the maximum number of snapshots that will be stored, default to 100
    -i, --snapshot-itv <Iterval>          interval between adjacent snapshots, default to 10 blocks
    -m, --snapshot-mode <Mode>            zfs/btrfs/external, will try a guess if missing
    -p, --snapshot-target <TargetPath>    a data volume containing both ledger data and tendermint data

Install as a 'systemd service'

Steps:

make
mv btm_package.tar.gz /tmp/
cd /tmp/
tar -xpf btm_package.tar.gz
cd btm_package

su # swith your user account to 'root'

./install.sh \
        --snapshot-itv=4 \
        --snapshot-cap=100 \
        --snapshot-mode=zfs \
        --snapshot-algo=fade \
        --snapshot-target=zfs/data

Outputs of systemctl status btm-daemon.service:

● btm-daemon.service - "btm daemon"
     Loaded: loaded (/lib/systemd/system/btm-daemon.service; enabled; vendor preset: disabled)
     Active: active (running) since Tue 2021-10-12 21:24:16 CST; 2min 27s ago
   Main PID: 334 (btm)
      Tasks: 1 (limit: 37805)
        CPU: 1ms
     CGroup: /system.slice/btm-daemon.service
             └─334 /usr/local/bin/btm daemon -p=/data -i=4 -c=100 -m=btrfs -a=fade

Usage of tools/install.sh:

# tools/install.sh -h

Usage

    install.sh
        --snapshot-itv=<ITV>
        --snapshot-cap=<CAP>
        --snapshot-mode=<MODE>
        --snapshot-algo=<ALGO>
        --snapshot-target=<TARGET>

Example

    install.sh \
        --snapshot-itv=4 \
        --snapshot-cap=100 \
        --snapshot-mode=zfs \
        --snapshot-algo=fade \
        --snapshot-target=zfs/data

Example, short style

    install.sh -i=4 -c=100 -m=zfs -a=fade -t=zfs/data
You might also like...
🌍 The Earth Blockchain on Polkadot (archived)

Social Network Blockchain · The Social Network blockchain is a next-generation governance, economic, and social system for humanity built on Polkadot

High Performance Blockchain Deserializer

bitcoin-explorer bitcoin_explorer is an efficient library for reading bitcoin-core binary blockchain file as a database (utilising multi-threading). D

Substrate blockchain generated with Substrate Startkit

Substrate Node Template A new FRAME-based Substrate node, ready for hacking 🚀 Getting Started This project contains some configuration files to help

Substrate blockchain generated with Substrate Startkit

Substrate Node Template A new FRAME-based Substrate node, ready for hacking 🚀 Getting Started This project contains some configuration files to help

Trinci blockchain node

TRINCI TRINCI Blockchain Node. Requirements The required dependencies to build correctly the project are the following: clang libclang-dev (ver. 11 su

A lightweight and flexible framework to build your tailored blockchain applications.

TRINCI Blockchain Core A lightweight and flexible framework to build your tailored blockchain applications. Requirements The required dependencies to

flow-rust-sdk utilizes the Flow gRPC AccessAPI to make requests on the flow blockchain.

Welcome to the Flow-Rust-SDK! We're glad to have you here. There are a few important items that we should cover real quick before you dive in. Version

Testing a smart contract on the Solana blockchain

Environment Setup Install Rust from https://rustup.rs/ Install Solana from https://docs.solana.com/cli/install-solana-cli-tools#use-solanas-install-to

This is the Repo used to learn blockchain development in conjusction with the CyberGen NFT Project.

Environment Setup Install Rust from https://rustup.rs/ Install Solana from https://docs.solana.com/cli/install-solana-cli-tools#use-solanas-install-to

Owner
凡日月所照,江河所至,皆為漢土。
漢
Marvin-Blockchain-Rust: A Rust-based blockchain implementation, part of the Marvin blockchain project.

Marvin Blockchain - Rust Implementation Welcome to the Rust implementation of the Marvin Blockchain. This project is part of a comparative study on bu

João Henrique Machado Silva 3 Sep 6, 2024
A high performance blockchain kernel for enterprise users.

English | 简体中文 What is CITA CITA is a fast and scalable blockchain kernel for enterprises. CITA supports both native contract and EVM contract, by whi

CITAHub 1.3k Dec 22, 2022
The Nervos CKB is a public permissionless blockchain, and the layer 1 of Nervos network.

Nervos CKB - The Common Knowledge Base master develop About CKB CKB is the layer 1 of Nervos Network, a public/permissionless blockchain. CKB uses Pro

Nervos Network 1k Dec 30, 2022
The Phala Network Blockchain, pRuntime and the bridge.

Phala Blockchain Phala Network is a TEE-Blockchain hybrid architecture implementing Confidential Contract. This repo includes: node/: the main blockch

Phala Network 314 Jan 6, 2023
Substrate: The platform for blockchain innovators

Substrate · Substrate is a next-generation framework for blockchain innovation ?? . Trying it out Simply go to substrate.dev and follow the installati

Parity Technologies 7.7k Dec 30, 2022
An extensible open-source framework for creating private/permissioned blockchain applications

Exonum Status: Project info: Community: Exonum is an extensible open-source framework for creating blockchain applications. Exonum can be used to crea

Exonum 1.2k Jan 1, 2023
Local blockchain for Free TON DApp development and testing.

TON OS Startup Edition Local blockchain for Free TON DApp development and testing. Have a question? Get quick help in our channel: TON OS Startup Edit

TON Labs 35 Jan 2, 2023
A value transfer bridge between the Monero blockchain and the Secret Network.

Secret-Monero-Bridge A value transfer bridge between the Monero blockchain and the Secret Network. Proof-of-Concept Video Demonstration: https://ipfs.

null 28 Dec 7, 2022
C++ `std::unique_ptr` that represents each object as an NFT on the Ethereum blockchain

C++ `std::unique_ptr` that represents each object as an NFT on the Ethereum blockchain

null 1.9k Dec 28, 2022
HyperCube is a free and open source blockchain project for everyone to use.

XPZ Public Chain HyperCube is a free and open source blockchain project for everyone to use. 日本語 简体中文 正體中文 HyperCube Wiki Wha is HyperCube HyperCube i

null 949 Dec 31, 2022