diff --git a/cmd/mattermost/commands/export.go b/cmd/mattermost/commands/export.go index 0515731f15..fd4b37a1fe 100644 --- a/cmd/mattermost/commands/export.go +++ b/cmd/mattermost/commands/export.go @@ -45,6 +45,14 @@ var ActianceExportCmd = &cobra.Command{ RunE: buildExportCmdF("actiance"), } +var GlobalRelayZipExportCmd = &cobra.Command{ + Use: "global-relay-zip", + Short: "Export data from Mattermost into a zip file containing emails to send to Global Relay for debug and testing purposes only.", + Long: "Export data from Mattermost into a zip file containing emails to send to Global Relay for debug and testing purposes only. This does not archive any information in Global Relay.", + Example: "export global-relay-zip --exportFrom=12345", + RunE: buildExportCmdF("globalrelay-zip"), +} + var BulkExportCmd = &cobra.Command{ Use: "bulk [file]", Short: "Export bulk data.", @@ -62,12 +70,14 @@ func init() { CsvExportCmd.Flags().Int64("exportFrom", -1, "The timestamp of the earliest post to export, expressed in seconds since the unix epoch.") ActianceExportCmd.Flags().Int64("exportFrom", -1, "The timestamp of the earliest post to export, expressed in seconds since the unix epoch.") + GlobalRelayZipExportCmd.Flags().Int64("exportFrom", -1, "The timestamp of the earliest post to export, expressed in seconds since the unix epoch.") BulkExportCmd.Flags().Bool("all-teams", false, "Export all teams from the server.") ExportCmd.AddCommand(ScheduleExportCmd) ExportCmd.AddCommand(CsvExportCmd) ExportCmd.AddCommand(ActianceExportCmd) + ExportCmd.AddCommand(GlobalRelayZipExportCmd) ExportCmd.AddCommand(BulkExportCmd) RootCmd.AddCommand(ExportCmd) diff --git a/model/config.go b/model/config.go index addb3d1d0e..e9e818d053 100644 --- a/model/config.go +++ b/model/config.go @@ -174,11 +174,12 @@ const ( PLUGIN_SETTINGS_DEFAULT_DIRECTORY = "./plugins" PLUGIN_SETTINGS_DEFAULT_CLIENT_DIRECTORY = "./client/plugins" - COMPLIANCE_EXPORT_TYPE_CSV = "csv" - COMPLIANCE_EXPORT_TYPE_ACTIANCE = "actiance" - COMPLIANCE_EXPORT_TYPE_GLOBALRELAY = "globalrelay" - GLOBALRELAY_CUSTOMER_TYPE_A9 = "A9" - GLOBALRELAY_CUSTOMER_TYPE_A10 = "A10" + COMPLIANCE_EXPORT_TYPE_CSV = "csv" + COMPLIANCE_EXPORT_TYPE_ACTIANCE = "actiance" + COMPLIANCE_EXPORT_TYPE_GLOBALRELAY = "globalrelay" + COMPLIANCE_EXPORT_TYPE_GLOBALRELAY_ZIP = "globalrelay-zip" + GLOBALRELAY_CUSTOMER_TYPE_A9 = "A9" + GLOBALRELAY_CUSTOMER_TYPE_A10 = "A10" CLIENT_SIDE_CERT_CHECK_PRIMARY_AUTH = "primary" CLIENT_SIDE_CERT_CHECK_SECONDARY_AUTH = "secondary"