LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   directories saved in /var/tmp got deleted automatically (https://www.linuxquestions.org/questions/linux-newbie-8/directories-saved-in-var-tmp-got-deleted-automatically-924926/)

dinakumar12 01-21-2012 03:22 AM

directories saved in /var/tmp got deleted automatically
 
Hi,

My backup script generates backup and a copy of it will be saved in my server's /var/tmp file with date.

But my older backup folders were deleted automatically from /var/tmp.

I have heared that the files in /tmp will be deleted automatically during boot process.

Can anyone explain about /var/tmp directory in which concept the old files were cleared here.

Satyaveer Arya 01-21-2012 04:36 AM

The /var/tmp directory is made available for programs that require temporary files or directories that are preserved between system reboots. Therefore, data stored in /var/tmp is more persistent than data in /tmp.

Files and directories located in /var/tmp must not be deleted when the system is booted. Although data stored in /var/tmp is typically deleted in a site-specific manner, it is recommended that deletions occur at a less frequent interval than /tmp.

All RHEL-based distros clean /var/tmp of files older than 30 days. I don't know about other distros. Look for a cron entry that invokes tmpwatch. On Fedora/RHEL it is /etc/cron.daily/tmpwatch. It has a line like /usr/sbin/tmpwatch "$flags" 30d /var/tmp or /usr/sbin/tmpwatch 720 /var/tmp. 720 hours = 30 days.

Satyaveer Arya 01-21-2012 04:39 AM

http://linuxers.org/article/differen...tmp-and-vartmp Check this page also...

dinakumar12 01-21-2012 06:01 AM

Hi Satyaveer Arya,


Thanks a lot for your reply,and whether all the 30 days old directories in /var/tmp will be cleared or the directories which have date in its name will be deleted.

Satyaveer Arya 01-21-2012 08:23 AM

All the 30 days old data in /var/tmp directory will be deleted...


All times are GMT -5. The time now is 01:15 AM.