A bash script to automate backups for ARK blockchain v0.1
##Requisites - This script works with postgres and ark_db, configured with ark user - You need to have sudo privileges
##Installation Execute the following commands
cd ~/
git clone https://github.com/ilgio/ark-snapshot
cd ark-snapshot/
bash ark-snapshot.sh help
##Available commands
- create
- restore
- log
- schedule
###create
Command create is for create new snapshot, example of usage:
bash ark-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 ark-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.
###log
Display all the snapshots created.
Example of usage:
bash ark-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