# Sichern mit Ausnahme von großen Tabellen (-T …)

echo „`date` : DB ohne hist. Daten sichern beginnt“ >> $logfile

/usr/pgsql-9.2/bin/pg_dump –host localhost –port 5432 –username „postgres“ –no-password -T acknowledges* -T alerts* -T audit* -T events* -T history* -T trends* –verbose –file „/media/nfs_backup/$datum-zabbix_datensicherung_db_ohne_hist_daten.sql“ „zabbix“

# Sichern der nur großen Tabellen, jedoch nur Schema ohne Daten (-t –schema-only)

/usr/pgsql-9.2/bin/pg_dump –host localhost –port 5432 –username „postgres“ –no-password –schema-only -t acknowledges* -t alerts* -t audit* -t events* -t history* -t trends* –verbose ‚zabbix‘ >> „/media/nfs_backup/$datum-zabbix_datensicherung_db_ohne_hist_daten.sql“

Categories: BlogUncategorized