Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

CosmiCloud/OTUpload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OTUpload

This will help you set up a cronjob that will trigger a script that triggers an aws-upload back up of your OriginTrail node. You will receive a Push notification whenever the trigger script completes or fails. If the upload trigger does fail, the notification will include log statements to identify the issue. THIS WILL NOT ALERT YOU IF THE BACKUP PROCESS FAILED, ONLY IF IT FAILED TO TRIGGER.

Follow the isntructions provided by the team here: https://knowledge-base.origintrail.io/en/articles/4255355-how-to-setup-auto-backup-script-which-uploads-data-to-amazon-s3-instance . For step 2/3 in the instructions, use this script instead of creating a new bash script.

Install the 'Notify My Device' app from the app store and install it onto your mobile device.

Navigate to https://www.notifymydevice.com/ and create an account. Go to 'My applications' and create an application. Copy the API key and save it for later.


On your node:
Install npm, nodejs

  • sudo apt install npm
  • sudo apt install nodejs

Edit your environment variables inside of your directory and add your API key and change your node name.

  1. Sudo nano .env
  2. Edit the variables below

APIKEY=Push notifcation api here
NODENAME=node name here
AWSACCESSKEYID=aws access key id here
AWSSECRETACCESSKEY=aws secret access key here
AWSBUCKETNAME=aws bucket name here

Add a Cron job to the bottom of your crontab to trigger the script. Test running the command before adding it to your crontab.

  1. Sudo nano /etc/crontab
  2. Edit and Paste the command below to the end of your crontab. The setting below will trigger the upload once a day at 8pm est.

0 0 * * 0 root cd ~/path/to/my/script/ && node upload.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published