[Rt-commit] rt branch, 4.4-trunk, updated. rt-4.4.4-431-g24a380ea2e

Jim Brandt jbrandt at bestpractical.com
Fri May 7 13:55:02 EDT 2021


The branch, 4.4-trunk has been updated
       via  24a380ea2ec641d0ebe53ac99d9cc16ade42ee8e (commit)
       via  b7c660f3c2859ecb335cb7dab227499ba35dbdde (commit)
       via  e73b179262aa8c7520c89521149dcb2d9e0b9572 (commit)
      from  b0bfcb602cb10368c2346f04ee993c14ace29b5c (commit)

Summary of changes:
 sbin/rt-shredder.in | 39 +++++++++++++++++++++++++++------------
 1 file changed, 27 insertions(+), 12 deletions(-)

- Log -----------------------------------------------------------------
commit e73b179262aa8c7520c89521149dcb2d9e0b9572
Author: sunnavy <sunnavy at 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..7fb4551908 100644
--- a/sbin/rt-shredder.in
+++ b/sbin/rt-shredder.in
@@ -80,6 +80,15 @@ 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 file.
+
+The SQL dump file provides you with a way to "undo" the removal of
+records from your RT database, if needed. Use this option only if
+you are sure you have a recent, valid database backup in case you
+need to recover data that may have been shredded in error.
+
 =head2 --object (DEPRECATED)
 
 Option has been deprecated, use plugin C<Objects> instead.
@@ -143,7 +152,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 +251,10 @@ sub parse_args
     if( GetOptions( 'sqldump=s' => \$tmp ) && $tmp ) {
         $opt{'sqldump'} = $tmp;
     }
+
+    if( GetOptions( 'no-sqldump' => \$tmp ) && $tmp ) {
+        $opt{'no-sqldump'} = $tmp;
+    }
     return;
 }
 

commit b7c660f3c2859ecb335cb7dab227499ba35dbdde
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri May 7 13:43:52 2021 -0400

    Update rt-shredder documentation

diff --git a/sbin/rt-shredder.in b/sbin/rt-shredder.in
index 7fb4551908..bf565b72df 100644
--- a/sbin/rt-shredder.in
+++ b/sbin/rt-shredder.in
@@ -48,7 +48,7 @@
 # END BPS TAGGED BLOCK }}}
 =head1 NAME
 
-rt-shredder - Script which wipe out tickets from RT DB
+rt-shredder - Utility to wipe out data from your RT database
 
 =head1 SYNOPSIS
 
@@ -61,24 +61,26 @@ rt-shredder - Script which wipe out tickets from RT DB
 
 =head1 DESCRIPTION
 
-rt-shredder - is script that allow you to wipe out objects
-from RT DB. This script uses API that L<RT::Shredder> module adds to RT.
-Script can be used as example of usage of the shredder API.
+rt-shredder wipes out objects from your RT database. This script uses
+an API that the L<RT::Shredder> module adds to RT.
+This script can also be used as example of usage of the shredder API.
 
 =head1 USAGE
 
-You can use several options to control which objects script
-should wipeout.
+You can use several options to control which objects rt-shredder
+should wipe out.
+
+When using other options, the --plugin option must be provided last.
 
 =head1 OPTIONS
 
 =head2 --sqldump <filename>
 
-Outputs INSERT queries into file. This dump can be used to restore data
-after wiping out.
+Outputs INSERT queries into a file for all shredded records.
+This dump can be used to restore data after wiping out.
 
-By default creates files named F<< <ISO_date>-XXXX.sql >> in the current
-directory.
+By default rt-shredder creates files named F<< <ISO_date>-XXXX.sql >>
+in the current directory.
 
 =head2 --no-sqldump
 
@@ -108,7 +110,7 @@ Outputs help for specified plugin.
 
 =head2 --force
 
-Script doesn't ask any questions.
+Don't prompt with questions before shredding objects.
 
 =head1 SEE ALSO
 

commit 24a380ea2ec641d0ebe53ac99d9cc16ade42ee8e
Merge: b0bfcb602c b7c660f3c2
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri May 7 13:47:22 2021 -0400

    Merge branch '4.4/shredder-no-sqldump-option' into 4.4-trunk


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


More information about the rt-commit mailing list