Code Monkey home page Code Monkey logo

ot-smoothbrain-backup's People

Contributors

calr0x avatar valcyclovir avatar

Watchers

 avatar  avatar

ot-smoothbrain-backup's Issues

smoothbrain backup issue

When i tried backup manualy with ./restic-backup.sh command i faced this issue:

root@vps-730cd348:# source /root/OT-Settings/config.sh
root@vps-730cd348:
# cd OT-Smoothbrain-Backup
root@vps-730cd348:~/OT-Smoothbrain-Backup# ./restic-backup.sh
./restic-backup.sh: line 4: STATUS: command not found
./restic-backup.sh: line 5: N1: command not found
./restic-backup.sh: line 7: [-d: command not found
ln: failed to create symbolic link '/root/backup/backup': File exists
Backing up OT Node data
./restic-backup.sh: command substitution: line 18: syntax error near unexpected token &' ./restic-backup.sh: command substitution: line 18: node /ot-node/current/scripts/backup.js --config=/ot-node/current/.origintrail_noderc --configDir=/root/.origintrail_noderc/mainnet --backupDirectory=/root/backup 2 > &1)'
./restic-backup.sh: line 19: [1: command not found
Moving data out of dated folder into backup
./restic-backup.sh: command substitution: line 26: syntax error near unexpected token &' ./restic-backup.sh: command substitution: line 26: mv -v /root/backup/202*/* /root/backup/ 2 > &1)'
./restic-backup.sh: line 27: [1: command not found
Moving hidden data out of dated folder into backup
./restic-backup.sh: command substitution: line 34: syntax error near unexpected token &' ./restic-backup.sh: command substitution: line 34: mv -v /root/backup//.origintrail_noderc /root/backup/ 2 > &1)'
./restic-backup.sh: line 35: [1: command not found
0
Deleting dated folder
./restic-backup.sh: command substitution: line 43: syntax error near unexpected token &' ./restic-backup.sh: command substitution: line 43: rm -rf /root/backup/202
2 > &1)'
./restic-backup.sh: line 44: [1: command not found
0
Uploading data to Amazon S3
./restic-backup.sh: command substitution: line 52: syntax error near unexpected token &' ./restic-backup.sh: command substitution: line 52: /root/OT-Smoothbrain-Backup/restic backup /root/backup/.origintrail_noderc /root/backup/* 2 > &1)'
./restic-backup.sh: line 53: [1: command not found

Instructions to restore docker node with smoothbrain backup

  1. Create a fresh server and follow https://otnode.com/ (1-4 of new node guide)
  2. Install smoothbrain steps 1-9 (first apt install git)
  3. ./restic snapshots (if this doesn't work copy and paste the config from a working smoothbrain config)
  4. Review the snapshots and make spot the server you want to restore, include the node name in the next command
  5. ./restic snapshots -H Otnode1 (replace "Otnode1" with your node name from step 4)
  6. Review list of snapshots for that node
  7. ./restic restore SNAPSHOT_ID --target / (replace "SNAPSHOT_ID" with 8 digit snapshot id which you want to restore, newest is the bottom one)
  8. Do the following command
    cp /root/OT-Smoothbrain-Backup/backup/.origintrail_noderc /root/.origintrail_noderc
    Edit the IP if it has changed with:
    nano /root/.origintrail_noderc
  9. Move the backup folder from /root/backup/root/OT-Smoothbrain-Backup/backup/ to /backup with the following command:
    mv /root/backup/root/OT-Smoothbrain-Backup/backup/ /root/
  10. Do restore steps 7-8 of (https://otnode.com/node-backup/)
  11. Edit restore.sh using this command:
    nano /root/restore.sh
    #change backup directory BACKUPDIR="none" to BACKUPDIR="OT-Smoothbrain-Backup/backup"
  12. Step 9 of otnode restore guide, being ./restore.sh

Permission denied

Running on Raspberry pi, I encounter permission denied when trying to ./restic-cleanup.sh on data/send.sh, restic and restic-cleanup.sh

Example :
./restic-cleanup.sh
-bash: ./restic-cleanup.sh: Permission denied

Temporary solution :
chmod +x restic-cleanup.sh
chmod +x restic
cd data && chmod +x send.sh

Dmitry Coldbackup/restore with docker

it seems i have a success with docker cold/raw backup

  1. starting point - docker node is running
  2. stop arangodb (keep container running) - docker exec $nodename supervisorctl stop arango
  3. backup arangodb3 and arangodb3-apps from merged folder
  4. stop container completely
  5. backup ot-node/data folder from diff folder

to restore the node

  1. create a container (don't run it)
  2. copy arangodb3, arangodb3-apps and data folder into diff folder
  3. start the container

I've tested this flow with incorrect domain name and closed ports etc... and the node starts i see new offers created
now i need to test it with an actual node with all correct parameters

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.