[freeside-commits] branch master updated. 57bb423fe457ba4e13726877f53bcdf944f828f8

Ivan Kohler ivan at freeside.biz
Tue Aug 10 11:30:59 PDT 2021


The branch, master has been updated
       via  57bb423fe457ba4e13726877f53bcdf944f828f8 (commit)
      from  a5f318d0dd9d0ae0e1d6e286c66bed8bcf287808 (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 57bb423fe457ba4e13726877f53bcdf944f828f8
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Aug 10 11:30:58 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