2 ##############################################################################
3 # Copyright (c) 2018 Linux Foundation and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
11 BACKUP_DIR=$HOME/backups
13 TAR_FILE=pharos-dashboard-db-$DATE.tar.tz
17 echo "--> Backing up Pharos Dashboard"
20 -v pharos-data:/pharos-data:ro \
21 -v $BACKUP_DIR:/backup \
23 tar -czf /backup/$TAR_FILE -C /pharos-data ./
25 /usr/local/bin/gsutil cp $BACKUP_DIR/$TAR_FILE \
26 gs://opnfv-backups/pharos-dashboard/ && rm $BACKUP_DIR/$TAR_FILE
28 echo "--> Pharos dashboard backup complete"