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
  • Hi ,

    Is this for on-site?

    If it is, for the BPM part you could have a look at a tool I built a while back, as-is (no official support) called toothpaste. Have a look at what it does behind the scenes: https://github.com/esimonetti/toothpaste 

    Hope it helps

    --

    Enrico Simonetti

    Sugar veteran (from 2007)

    www.naonis.tech


    Feel free to reach out for consulting regarding:

    • API Integration and Automation Services
    • Sugar Architecture
    • Sugar Performance Optimisation
    • Sugar Consulting, Best Practices and Technical Training
    • AWS and Sugar Technical Help
    • CTO-as-a-service
    • Solutions-as-a-service
    • and more!

    All active SugarCRM certifications

    Actively working remotely with customers based in APAC and in the United States

  • 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

  • That's odd. Were you able to get it to work previously? What was different then? Different Sugar version? Different php version?

    Could you give more details about the Sugar version? Could you try with the latest you have at hand?

    My educated guess would be that perhaps it is an older Sugar version, which this tool was built after?

    Either way, please let me know how I can help, as I would like to fix it if something is not working.

    Cheers!

    --

    Enrico Simonetti

    Sugar veteran (from 2007)

    www.naonis.tech


    Feel free to reach out for consulting regarding:

    • API Integration and Automation Services
    • Sugar Architecture
    • Sugar Performance Optimisation
    • Sugar Consulting, Best Practices and Technical Training
    • AWS and Sugar Technical Help
    • CTO-as-a-service
    • Solutions-as-a-service
    • and more!

    All active SugarCRM certifications

    Actively working remotely with customers based in APAC and in the United States

  • Hello Enrico,

    Not on this instance in fact, on others yes (on prem as well as sugardockerized).

    We are still in SugarCRM v7.9.3.0, we plan to migrate in a few months. Could it be the reason ?

    Thanks a lot for your feedback.

    Best regards and have a nice week !

    Enes

Reply Children
No Data