This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Client: | |
Context: default | |
Debug Mode: false | |
Plugins: | |
app: Docker App (Docker Inc., v0.9.1-beta3) | |
buildx: Build with BuildKit (Docker Inc., v0.5.1-docker) | |
Server: | |
Containers: 2 | |
Running: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
today=$(date "+%Y-%m-%d") | |
last_week=$(date -d "1 weeks ago" "+%Y-%m-%d") | |
data_dir="/tmp" | |
data_file="zabbix-$today.sql" | |
lastweek_file="zabbix-$last_week.sql" | |
echo "Dumping zabbix databse into $data_dir/$data_file" | |
pg_dump -h localhost -d zabbix -f $data_dir/$data_file --exclude-table-data=history* --exclude-table-data=trends* --exclude-table-data=events --exclude-table-data=alerts --exclude-table-data=sessions --exclude-table-data=auditlog --exclude-table-data=acknowledges |