Announcement

Collapse
No announcement yet.

remove files from Data/Upload

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • remove files from Data/Upload

    Hi all
    I have a client that is wanting to move their EspoCRM installation to a new server. They have not enabled "Clean up deleted records". They have recently deleted a large number of records (>4,000) and have approx. 120Gb of files in the data/upload directory - many belonging to record now marked as "remove".

    I have activated the "Clean up deleted records" but need to accelerate the process so that the records and associated attachments in data/upload are removed.

    I have studied the cleanup.php file but any changes I have made to the periods do not appear to have any effect. (I have changed the settings to run every 15 minutes - */15 * * * *)

    protected $cleanupJobPeriod = '10 days';
    protected $cleanupActionHistoryPeriod = '15 days';
    protected $cleanupAuthTokenPeriod = '1 month';
    protected $cleanupAuthLogPeriod = '2 months';
    protected $cleanupNotificationsPeriod = '2 months';
    protected $cleanupAttachmentsPeriod = '15 days';
    protected $cleanupAttachmentsFromPeriod = '3 months';
    protected $cleanupRemindersPeriod = '15 days';
    protected $cleanupBackupPeriod = '2 month';
    protected $cleanupDeletedRecordsPeriod = '3 months';
    protected $cleanupWebhookQueuePeriod = '10 days';​

    How do I change teh settings to make all these records disappear when the cleanup job is next run. Am I missing something?

    Any help would be greatly appreciated.

    V: 5.7.11
    Last edited by nickh; 03-13-2023, 10:39 AM.

  • #2
    Have you tried to change the cron job setting for clean-up. go to Administration > Scheduled Jobs > Choose Clean-up job and edit its scheduling. see attached screenshot. i think that would work and it would allow to run the clean-up schedule job every 15 minutes.

    Hope this helps
    Attached Files
    Rabii
    Web Dev

    Comment


    • nickh
      nickh commented
      Editing a comment
      Thanks - however I have already done this and the records remain.

  • #3
    Hi,
    V: 5.7.11
    120GB .. waouww..

    it's old.. you must upgrade your instance.
    in +- V6 , you can see Attachment in admin section, and filter in "orphan" attachment.
    but i don't know if cleanUp delete physicaly the attachment... i have a little look in cleanUp.. but not see something with fileManager.
    Maybe you need take sample in job for attachment and make a job for your requirement.. but at your own risk !
    Last edited by item; 03-13-2023, 07:43 PM.

    Comment


    • nickh
      nickh commented
      Editing a comment
      The client is currently stuck on a server that is max. PHP7.3 and MySQL 5.6, hence wanting to move to new server and upgrade to the latest release which requires higher versions. But with so many files and 120Gb it is troublesome to move. Was looking for solution to delete "removed" records and associated files in data/upload.
      Do you have any constructive suggestions?
Working...
X