Mailing List Archive

rt branch, 4.4/shredder-no-sqldump-option, created. rt-4.4.4-348-gb9bf628e92
The branch, 4.4/shredder-no-sqldump-option has been created
at b9bf628e92e4acbe07011a52de514256874cbd94 (commit)

- Log -----------------------------------------------------------------
commit b9bf628e92e4acbe07011a52de514256874cbd94
Author: sunnavy <sunnavy@bestpractical.com>
Date: Tue May 19 02:27:42 2020 +0800

Add no-sqldump option to rt-shredder to avoid generating backups

This is to speed up shredder and should be used only when necessary.

diff --git a/sbin/rt-shredder.in b/sbin/rt-shredder.in
index e924f38163..541ac13a26 100644
--- a/sbin/rt-shredder.in
+++ b/sbin/rt-shredder.in
@@ -80,6 +80,10 @@ after wiping out.
By default creates files named F<< <ISO_date>-XXXX.sql >> in the current
directory.

+=head2 --no-sqldump
+
+Don't generate the SQL dump.
+
=head2 --object (DEPRECATED)

Option has been deprecated, use plugin C<Objects> instead.
@@ -143,7 +147,7 @@ parse_args();

my $shredder = RT::Shredder->new;

-{
+if ( !$opt{'no-sqldump'} ) {
my $plugin = eval { $shredder->AddDumpPlugin( Arguments => {
file_name => $opt{'sqldump'},
from_storage => 0,
@@ -242,6 +246,10 @@ sub parse_args
if( GetOptions( 'sqldump=s' => \$tmp ) && $tmp ) {
$opt{'sqldump'} = $tmp;
}
+
+ if( GetOptions( 'no-sqldump' => \$tmp ) && $tmp ) {
+ $opt{'no-sqldump'} = $tmp;
+ }
return;
}


-----------------------------------------------------------------------
_______________________________________________
rt-commit mailing list
rt-commit@lists.bestpractical.com
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit