Code Monkey home page Code Monkey logo

snapshots's Introduction

Run your own backup server with snapshots

Install requirements

sudo apt update && \
sudo apt install curl git docker.io -y

Clone github repo
git clone https://github.com/staketown/snapshots.git && cd cosmos-snapshots

Create folder for snapshots
mkdir $HOME/snapshots/

Start Nginx via docker

cd $HOME; \
docker run --name snapshots \
--restart always \
-v $(pwd)/default.conf:/etc/nginx/conf.d/default.conf \
-v $(pwd)/snapshots/:/root/ \
-p 80:80 \
-d nginx

Fill in the variables in the file agoric_snapshot.sh

CHAIN_ID="agoric-3"
SNAP_PATH="/root/snapshots/agoric"
LOG_PATH="/root/snapshots/agoric/agoric_log.txt"
DATA_PATH="/root/.agoric/data/"
SERVICE_NAME="agoricd.service"
RPC_ADDRESS="http://localhost:22657"

Create new snapshot
./agoric_snapshot.sh

Check snapshot

curl -s http://$(wget -qO- eth0.me)

Automation

You can add script to the cron

# start every day at 00:00
0 0 * * * /bin/bash -c '/root/agoric_snapshot.sh'

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.