Skip to content

Commit

Permalink
Merge pull request #404 from s-crypt/patch-1
Browse files Browse the repository at this point in the history
Use tar.xz for backups
  • Loading branch information
jasonacox authored Dec 17, 2023
2 parents 9d1bb39 + 1f46578 commit 1c2273d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backups/backup.sh.sample
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ docker exec influxdb influxd backup -database powerwall /var/lib/influxdb/backup
# Backup Powerwall-Dashboard Data
echo "Backing up Powerwall-Dashboard Data (influxdb)"
cd ${DASHBOARD}
tar -zcvf ${BACKUP_FOLDER}/Powerwall-Dashboard.$STAMP.tgz influxdb
tar -Jcvf ${BACKUP_FOLDER}/Powerwall-Dashboard.$STAMP.tar.xz influxdb

# 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
find ${BACKUP_FOLDER}/Powerwall-Dashboard.*tar.xz -mtime +${KEEP} -type f -delete
echo "Done"

0 comments on commit 1c2273d

Please sign in to comment.