Code Monkey home page Code Monkey logo

kapu-snapshot's Introduction

kapu-snapshot

A bash script to automate backups for KAPU blockchain v0.3

##Requisites - This script works with postgres and kapu_db, configured with kapu user - You need to have sudo privileges

##Installation Execute the following commands

cd ~/
git clone https://github.com/kapucoin/kapu-snapshot.git
cd kapu-snapshot
sudo updatedb
bash kapu-snapshot.sh help

##Available commands

  • create
  • restore
  • log
  • schedule
    • hourly
    • daily
    • weekly
    • monthly

###create Command create is for create new snapshot, example of usage:
bash kapu-snapshot.sh create
Automaticly will create a snapshot file in new folder called snapshot/.
Don't require to stop you node app.js instance.
Example of output:

   + Creating snapshot                                
  -------------------------------------------------- 
  OK snapshot created successfully at block  91005 ( 154 MB).

Also will create a line in the log, there you can see your snapshot at what block height was created.

###restore Command restore is for restore the last snapshot found it in snapshot/ folder.
Example of usage:
bash kapu-snapshot.sh restore

Automaticly will pick the last snapshot file in snapshot/ folder to restore the ark.
If you want to restore a specific file please (for this version) delete or move the other files in snapshot/ folder.
You can use the log command to better pick up your restore file.

Schedule

Schedule snapshot creation periodically, with the available parameters:

- hourly
- daily
- weekly
- monthly
Example: bash kapu-snapshot.sh schedule daily 

###log Display all the snapshots created.
Example of usage:
bash kapu-snapshot.sh log

Example of output:

   + Snapshot Log                                                                  
  --------------------------------------------------                               
  09-03-2017 - 20:59:06 -- Snapshot created successfully at block  91005 ( 154 MB)  
  09-03-2017 - 21:36:07 -- Snapshot created successfully at block  91019 ( 154 MB)  
  --------------------------------------------------END                            

kapu-snapshot's People

Contributors

kapucoin avatar ilgio avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.