Reputation: 1591
Is there a way to exclude a table from autopostgresqlbackup backups ?
I see the --exclude-table
flag in pg_dump, but is there a clean way to use it in autopostgresqlbackup ?
Upvotes: 1
Views: 195
Reputation: 509
You need to set the value (--exclude-table-data=my_table_name) of OPT
in /etc/default/autopostgresqlbackup
file.
If not, the default value of OPT ("") in /etc/default/autopostgresqlbackup
will overwrite the value set in /usr/sbin/autopostgresqlbackup
.
This file is included in the /usr/sbin/autopostgresqlbackup
as follows:
if [ -f /etc/default/autopostgresqlbackup ]; then
. /etc/default/autopostgresqlbackup
fi
Upvotes: 1
Reputation: 1591
OK, so apparently, there is no clean way.
You can hack your way to it by editing /usr/sbin/autopostgresqlbackup
:
OPT=""
to
OPT="--exclude-table=my_table"
but that might get overwritten when the package is updated.
Unfortunately, this variable is not exposed in the configuration file (/etc/default/autopostgresqlbackup
).
Upvotes: 0