使用autopostgresqlbackup排除表
有没有办法从备份中排除表使用autopostgresqlbackup排除表,postgresql,ubuntu,backup,Postgresql,Ubuntu,Backup,有没有办法从备份中排除表 我在pg_dump中看到了--exclude table标志,但是在autopostgresqlbackup中是否有干净的方法使用它呢?好的,显然没有干净的方法 您可以通过编辑/usr/sbin/autopostgresqlbackup来破解它: OPT="" 到 但当包更新时,这可能会被覆盖 遗憾的是,此变量未在配置文件(/etc/default/autopostgresqlbackup)中公开。您需要在/etc/default/autopostgresqlb
我在pg_dump中看到了
--exclude table
标志,但是在autopostgresqlbackup中是否有干净的方法使用它呢?好的,显然没有干净的方法
您可以通过编辑/usr/sbin/autopostgresqlbackup
来破解它:
OPT=""
到
但当包更新时,这可能会被覆盖
遗憾的是,此变量未在配置文件(/etc/default/autopostgresqlbackup
)中公开。您需要在/etc/default/autopostgresqlbackup
文件中设置OPT
的值(--exclude table data=my_table_name)
如果不是,则/etc/default/autopostgresqlbackup
中的默认值OPT(“”)将覆盖/usr/sbin/autopostgresqlbackup
中设置的值
此文件包含在/usr/sbin/autopostgresqlbackup
中,如下所示:
if [ -f /etc/default/autopostgresqlbackup ]; then
. /etc/default/autopostgresqlbackup
fi
什么是
autopostgresqlbackup
。是的。是否有另一个“标准”包来处理带轮换的每日/每周/每月备份?或多或少的标准方法是创建一个调用pg_dump(并处理轮换)的shell脚本。从cron调用。我猜autopostgresqlbackup
也有类似的功能。
if [ -f /etc/default/autopostgresqlbackup ]; then
. /etc/default/autopostgresqlbackup
fi