Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonacox committed Mar 5, 2022
2 parents 03e0798 + 7e4db61 commit 6fa9bdd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backups/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo "Creating InfluxDB Backup"
cd ${DASHBOARD}
mkdir -p influxdb/backups
chmod g+w influxdb/backups
docker exec -it influxdb influxd backup -database powerwall /var/lib/influxdb/backups
docker exec influxdb influxd backup -database powerwall /var/lib/influxdb/backups

# Backup Powerwall-Dashboard
echo "Backing up Powerwall-Dashboard (influxdb grafana)"
Expand All @@ -32,5 +32,6 @@ tar -zcvf ${BACKUP_FOLDER}/Powerwall-Dashboard.$STAMP.tgz influxdb grafana

# Cleanup Old Backups
echo "Cleaning up old backups"
rm -rf ${DASHBOARD}/influxdb/backups/* # Delete InfluxDB snapshots after backup
find ${BACKUP_FOLDER}/Powerwall-Dashboard.*tgz -mtime +${KEEP} -type f -delete
echo "Done"
echo "Done"

0 comments on commit 6fa9bdd

Please sign in to comment.