summaryrefslogtreecommitdiffstats
path: root/jjb/pharos/pharos.yml
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/pharos/pharos.yml')
-rw-r--r--jjb/pharos/pharos.yml23
1 files changed, 9 insertions, 14 deletions
diff --git a/jjb/pharos/pharos.yml b/jjb/pharos/pharos.yml
index 9f4feb42e..c721c8d87 100644
--- a/jjb/pharos/pharos.yml
+++ b/jjb/pharos/pharos.yml
@@ -16,28 +16,23 @@
disabled: '{obj:disabled}'
parameters:
- - project-parameter:
- project: 'pharos-tools'
- branch: 'master'
- 'pharos-dashboard-defaults'
- scm:
- - git-scm-gerrit
-
triggers:
- timed: '@daily'
builders:
- shell: |
- mkdir -p /home/backups/
- DATE=$(date +%Y%m%d)
- echo "-- $DATE --"
+ BACKUP_DIR=$HOME/backups/
+ TMP_DIR=$HOME/tmp/
+ mkdir -p $BACKUP_DIR
+ echo "-- $(date +%Y%m%d) --"
echo "Backing up Pharos Dashboard data..."
sudo docker run -it --rm \
- -v pharos_data:/pharos_data:ro \
- -v /tmp:/backup \
+ -v pharos-data:/pharos-data:ro \
+ -v $TMP_DIR:/backup \
alpine \
- tar -czf /backup/pharos-dashboard-db-$(date +%Y%m%d).tar.gz -C /pharos_data ./
- sudo mv /tmp/pharos-dashboard-db-$(date +%Y%m%d).tar.gz /home/backups/
- sudo chown $USER:$USER $WORKSPACE/backups/pharos-dashboard-db-$(date +%Y%m%d).tar.gz
+ tar -czf /backup/pharos-dashboard-db-$(date +%Y%m%d).tar.gz -C /pharos-data ./
+ sudo mv $TMP_DIR/pharos-dashboard-db-$(date +%Y%m%d).tar.gz $BACKUP_DIR
+ sudo chown $USER:$USER $BACKUP_DIR/pharos-dashboard-db-$(date +%Y%m%d).tar.gz
echo "...complete"