[freeside-commits] branch FREESIDE_3_BRANCH updated. 879ae94b7ed169d00f281d339c34dd003c23441a
Ivan Kohler
ivan at freeside.biz
Tue Aug 10 11:31:06 PDT 2021
The branch, FREESIDE_3_BRANCH has been updated
via 879ae94b7ed169d00f281d339c34dd003c23441a (commit)
from 2a0cdfdab4e3d57d7a14c96888cf89ea63b1c9ad (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 879ae94b7ed169d00f281d339c34dd003c23441a
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue Aug 10 11:31:05 2021 -0700
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 2ffbda0b3..dd09f570d 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");
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Cron/backup.pm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list