Skip to main content

After deleting some files from var/temp (some sql) some databases disappeared?

Comments

10 comments

  • cPRex Jurassic Moderator

    Hey there!  It's really impossible for me to say since I don't know what was deleted.  The safest option to ensure things are working well would be to restore the entire affected account from a backup.

    0
  • HeyHost

    Ok thanks. I was hoping I could restore these databases by restoring these files.
    Is there no feature to empty old tmp files from var/temp folder safely?

    0
  • cPRex Jurassic Moderator

    In general, you shouldn't need to manually remove files from that area as they are temporary in nature.

    Also in general, you can remove anything from that area except the MySQL sock file link and any actively open files.

    0
  • HeyHost

    Hey there,
    I am having a problem again with my var/tmp getting full.
    The filesystem “/var/tmp” mounted at “/var/tmp” reached “critical” status because you currently use 92.58% of its available blocks. 
    Once it gets totally full the websites stop working.
    How can I solve this for good?
    Can I increase the size of that folder or somehow figure out which files there are safe to delete and do it automatically?

    0
  • cPRex Jurassic Moderator

    How big is that directory?  If it's too small, you may just need to increase the size: https://support.cpanel.net/hc/en-us/articles/360063263733-How-to-increase-the-size-of-the-cPanel-generated-tmp-filesystem

    0
  • HeyHost

    Disk Block Usage:
    Used: 3.6 GB
    Available: 148 MB
    Total: 3.87 GB

    An hour ago it was 293Mb available. Something is filling up the tmp folder fast.

    0
  • HeyHost

    Thanks for the link. 
    Not sure if I should do this on my own.?!?
    Previously, I deleted files from way back of last year until 1st of April 2025. 
    Now I see the files from beginning of April 2025 are still there. 
    Shouldn't these files be auto-deleted by the system?

    0
  • cPRex Jurassic Moderator

    Not necessarily - it really depends on what the files are and what created them.

    0
  • HeyHost

    How can I find out what the files are and what is creating them?
    I tried to check out which services are currently using tmp with:
    lsof | grep /tmp | grep -v deleted
    but I do not understand the output... it has a lot of Java listings...

    0
  • cPRex Jurassic Moderator

    Finding them is always the trickiest part.  I would recommend trying just "lsof | grep tmp" and then reading through that list.  the second column of the output is the PID so you can then search for more details based on that if you want.

    What is the total size of /tmp on your machine?

    0

Please sign in to leave a comment.