From: Ivan Kohler Date: Tue, 10 Aug 2021 18:31:02 +0000 (-0700) Subject: backup the schema for tables we don't need the data from. RT#85959 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=d6e22939c76c15fe97a298ff2a57b1154d89438f;hp=8a04358596894ee29bc0c9317c66ab6d91508373;p=freeside.git backup the schema for tables we don't need the data from. RT#85959 --- diff --git a/FS/FS/Cron/backup.pm b/FS/FS/Cron/backup.pm index 8264ae1d6..65d7acb0b 100644 --- a/FS/FS/Cron/backup.pm +++ b/FS/FS/Cron/backup.pm @@ -25,7 +25,11 @@ sub backup { my $ext; if ( driver_name eq 'Pg' ) { - system("pg_dump -Fc -T h_cdr -T h_queue -T h_queue_arg -T sessions $database >/var/tmp/$database.Pg"); + system('pg_dump -Fc '. join(' ', map { "--exclude-table-data $_" } + qw( h_cdr h_queue h_queue_arg sessions ) + ). + " $database >/var/tmp/$database.Pg" + ); $ext = 'Pg'; } elsif ( driver_name eq 'mysql' ) { system("mysqldump $database >/var/tmp/$database.sql");