PMSE tables cleaning in database

Dear developpers,

I would like to make a cleaning for the executed BPM processes, is it enough to remove data from the table PMSE_INBOX or is there other table to cleanup ?

Additionnaly, I would do the same for the emails, I want to keep only one year of data, I identified the following tables : 

  • emails
  • emails_beans
  • emails_email_addr_rel
  • emails_text

What do you propose ? Did you face the same issue ? What is the best practice to make a safe cleanup / archiving ?

Thanks in advance,

Enes

Parents Reply Children
  • can you update your Toothpaste README to let us know what the tool does? 

  • Hello ,

    Yes, it is on site. I see that it is only available for MySQL, our customer is running on Oracle Dabatase Disappointed

    According to that, we can also not use sugarcli.phar for cleaning the datase ... 

    I'll have a look, thanks a lot !

    Have a nice day !

    Enes

  • Hello again ,

    I installed in our dev environment, but I have the following error while running any command : 

    [28-Jan-2021 10:30:37 Europe/Luxembourg] PHP Fatal error:  Uncaught Error: Call to a member function retrieveSettings() on null in /var/www/html/sfa3-uat/sfa-sugar/modules/Administration/Administration.php:368
    Stack trace:
    #0 /var/www/html/sfa3-uat/sfa-sugar/include/entryPoint.php(199): Administration::getSettings()
    #1 /var/www/html/sfa3-uat/toothpaste/vendor/esimonetti/toothpaste/src/Sugar/Instance.php(78): require_once('/var/www/html/s...')
    #2 /var/www/html/sfa3-uat/toothpaste/vendor/esimonetti/toothpaste/src/Commands/CustomTableOrphansCleanupCommand.php(47): Toothpaste\Sugar\Instance::setup()
    #3 /var/www/html/sfa3-uat/toothpaste/vendor/symfony/console/Command/Command.php(255): Toothpaste\Commands\CustomTableOrphansCleanupCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #4 /var/www/html/sfa3-uat/toothpaste/vendor/symfony/console/Application.php(935): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\Conso in /var/www/html/sfa3-uat/sfa-sugar/modules/Administration/Administration.php on line 368
    [28-Jan-2021 10:30:37 Europe/Luxembourg] PHP Fatal error:  Uncaught Error: Call to a member function retrieveSettings() on null in /var/www/html/sfa3-uat/sfa-sugar/modules/Administration/Administration.php:368
    Stack trace:
    #0 /var/www/html/sfa3-uat/sfa-sugar/modules/Trackers/TrackerManager.php(42): Administration::getSettings('tracker')
    #1 /var/www/html/sfa3-uat/sfa-sugar/modules/Trackers/TrackerManager.php(78): TrackerManager->setup(false)
    #2 /var/www/html/sfa3-uat/sfa-sugar/include/utils.php(3181): TrackerManager::getInstance()
    #3 [internal function]: sugar_cleanup()
    #4 {main}
      thrown in /var/www/html/sfa3-uat/sfa-sugar/modules/Administration/Administration.php on line 368
    

    Here is the call I'm doing : 

    ./toothpaste/vendor/bin/toothpaste local:data:clean:custom-orphans --yes-hard-delete-live-data --instance=/var/www/html/sfa3-uat/sfa-sugar/

    Do you have an idea on what is wrong ? 

    I'm facing the error even if I run it with root user or apache user.

    Best regards,

    Enes