File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ func registerBackupCmd(rootCmd *cobra.Command) {
103
103
backupRedactCmd .Flags ().Bool ("redact-definitions" , true , "redact definitions" )
104
104
backupRedactCmd .Flags ().Bool ("redact-relations" , true , "redact relations" )
105
105
backupRedactCmd .Flags ().Bool ("redact-object-ids" , true , "redact object IDs" )
106
+ backupRedactCmd .Flags ().Bool ("print-redacted-object-ids" , false , "prints the redacted object IDs" )
106
107
107
108
// Restore used to be on the root, so add it there too, but hidden.
108
109
restoreCmd := & cobra.Command {
@@ -550,6 +551,15 @@ func backupRedactCmdFunc(cmd *cobra.Command, args []string) error {
550
551
tbl .Print ()
551
552
fmt .Println ()
552
553
554
+ if len (redactor .RedactionMap ().ObjectIDs ) > 0 && cobrautil .MustGetBool (cmd , "print-redacted-object-ids" ) {
555
+ tbl = table .New ("Object ID" , "Redacted Object ID" )
556
+ for k , v := range redactor .RedactionMap ().ObjectIDs {
557
+ tbl .AddRow (k , v )
558
+ }
559
+ tbl .Print ()
560
+ fmt .Println ()
561
+ }
562
+
553
563
return nil
554
564
}
555
565
You can’t perform that action at this time.
0 commit comments