Skip to content

Commit

Permalink
fix for dalishot backup (#569)
Browse files Browse the repository at this point in the history
* fix for dalishot backup

* testing backup

* testing backup

* testing backup

* testing backup

* cleanup

* exclude subxt

Co-authored-by: Seun Lanlege <seunlanlege@gmail.com>
  • Loading branch information
2 people authored and hussein-aitlahcen committed Feb 3, 2022
1 parent cab861b commit dea3314
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 758 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/picashot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check Runtime
name: Picasso and Dali Snapshot
on:
workflow_dispatch:
schedule:
Expand All @@ -19,9 +19,8 @@ jobs:
docker system prune --force --all --volumes
- name: Run ansible playbook
working-directory: "./.maintain/playbooks"
run: |
ansible-playbook -l _mainnet_collator_yes picashot.yml -i picasso-gcp.yaml --user root -e 'ansible_python_interpreter=/usr/bin/python3'
ansible-playbook -l _mainnet_collator_yes /opt/ansible/inventory/picashot.yml -i /opt/ansible/inventory/picasso-gcp.yaml --user root -e 'ansible_python_interpreter=/usr/bin/python3'
dalishot:
runs-on:
Expand All @@ -38,6 +37,5 @@ jobs:
docker system prune --force --all --volumes
- name: Run ansible playbook
working-directory: "./.maintain/playbooks"
run: |
ansible-playbook -l _collator_node_yes picashot.yml -i gcp.yaml --user runner -e 'ansible_python_interpreter=/usr/bin/python3'
ansible-playbook -l _collator_node_yes /opt/ansible/inventory/dalishot.yml -i /opt/ansible/inventory/gcp.yaml --user runner -e 'ansible_python_interpreter=/usr/bin/python3'
19 changes: 19 additions & 0 deletions .maintain/playbooks/dalishot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
- name: Create Backup for Picasso nodes
hosts: all
become: root
tasks:
- name: Run Backup Script
become: true
shell: |
#!/bin/bash
DATE=$(date +'%m-%d-%Y')
HOST=$(echo $HOSTNAME)
FILENAME=$HOST-$DATE.zip
BACKUP_DIR="/var/lib/composable-data/chains"
GS_BUCKET="dali-chachacha-data-store"
sudo zip -r $FILENAME $BACKUP_DIR
sudo gsutil mv $FILENAME gs://$GS_BUCKET/
args:
executable: /bin/bash
register: stdout
Loading

0 comments on commit dea3314

Please sign in to comment.