
######################
SupportBundleGenerator
######################


****
NAME
****


Kernel::System::SupportBundleGenerator - support bundle generator


***********
DESCRIPTION
***********


All support bundle generator functions.


****************
PUBLIC INTERFACE
****************


new()
=====


Don't use the constructor directly, use the ObjectManager instead:


.. code-block:: perl

     my $SupportBundleGeneratorObject = $Kernel::OM->Get('Kernel::System::SupportBundleGenerator');



Generate()
==========


Generates a support bundle \ ``.tar``\  or \ ``.tar.gz``\  with the following contents:
Support Data, Installed Packages, and another \ ``.tar``\  or \ ``.tar.gz``\  with all changed or new files in the
OTRS installation directory.


.. code-block:: perl

     my $Result = $SupportBundleGeneratorObject->Generate();


Returns:


.. code-block:: perl

     $Result = {
         Success => 1,                                # Or false, in case of an error
         Data    => {
             Filecontent => \$Tar,                    # Outer tar content reference
             Filename    => 'SupportBundle.tar',      # The outer tar filename
             Filesize    =>  123                      # The size of the file in mega bytes
         },



GenerateCustomFilesArchive()
============================


Generates a \ ``.tar``\  or \ ``.tar.gz``\  file with all eligible changed or added files taking the ARCHIVE file as a reference


.. code-block:: perl

     my ( $Content, $Filename ) = $SupportBundleGeneratorObject->GenerateCustomFilesArchive();


Returns:


.. code-block:: perl

     $Content  = $FileContentsRef;
     $Filename = 'application.tar';      # or 'application.tar.gz'



GeneratePackageList()
=====================


Generates a .csv file with all installed packages


.. code-block:: perl

     my ( $Content, $Filename ) = $SupportBundleGeneratorObject->GeneratePackageList();


Returns:


.. code-block:: perl

     $Content  = $FileContentsRef;
     $Filename = 'InstalledPackages.csv';



GenerateConfigurationDump()
===========================


Generates a <.yml> file with the otrs system configuration information


.. code-block:: perl

     my ( $Content, $Filename ) = $SupportBundleGeneratorObject->GenerateConfigurationDump();


Returns:


.. code-block:: perl

     $Content  = $FileContentsRef;
     $Filename = <'ModifiedSettings.yml'>;



GenerateSupportData()
=====================


Generates a \ ``.json``\  file with the support data


.. code-block:: perl

     my ( $Content, $Filename ) = $SupportBundleGeneratorObject->GenerateSupportData();


Returns:


.. code-block:: perl

     $Content  = $FileContentsRef;
     $Filename = 'GenerateSupportData.json';





