mirror of
https://github.com/dredx/prole.git
synced 2026-09-27 17:14:31 +00:00
14 lines
248 B
Bash
Executable File
14 lines
248 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
DB="/etc/pihole/pihole-FTL.db"
|
|
ARCHIVE_DIR="/var/lib/pihole/db-archive"
|
|
TS="$(date +%F_%H%M%S)"
|
|
|
|
mkdir -p "$ARCHIVE_DIR"
|
|
|
|
if [[ -f "$DB" ]]; then
|
|
gzip -c "$DB" > "$ARCHIVE_DIR/pihole-FTL.db.$TS.gz"
|
|
rm -f "$DB"
|
|
fi
|