Skip to content

Commit

Permalink
Add backup.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
afausti committed Dec 12, 2024
1 parent 8ad94fb commit dfd2ed2
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion backup/backup.sh
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
echo "backup"
#!/bin/bash

set -e

# Configuration
BACKUP_DIR="/backup/sasquatch-influxdb-enterprise-backup"
GCS_BUCKET="gs://your-gcs-bucket"

# Ensure the backup directory exists
mkdir -p "$BACKUP_DIR"

echo "Starting InfluxDB Enterprise backup..."

influxd-ctl -bind sasquatch-influxdb-enterprise-meta.sasquatch:8091 backup -strategy incremental "$BACKUP_DIR"

if [ $? -eq 0 ]; then
echo "Backup completed successfully at $BACKUP_DIR."
else
echo "Backup failed!" >&2
exit 1
fi


0 comments on commit dfd2ed2

Please sign in to comment.