[freeside-commits] branch FREESIDE_4_BRANCH updated. d6e22939c76c15fe97a298ff2a57b1154d89438f

Ivan Kohler ivan at freeside.biz
Tue Aug 10 11:31:03 PDT 2021


The branch, FREESIDE_4_BRANCH has been updated
       via  d6e22939c76c15fe97a298ff2a57b1154d89438f (commit)
      from  8a04358596894ee29bc0c9317c66ab6d91508373 (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 d6e22939c76c15fe97a298ff2a57b1154d89438f
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Aug 10 11:31:02 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 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");

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Cron/backup.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list