New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RHEL 6 & 7 utility tmpwatch deletes backups (e.g. in case of BACKUP=SSHFS) #1774
Comments
This is exact reason why I'm not a fan of automatic cleanup scripts. There is always that "little something" that should not pass the cleanup filter, but it does (for whatever reason). V. |
@John-Leone As far as I understand it it looks as if there is a severe bug As a test on a testing virtual machine where it does not matter |
I'm in agreement with you, we think this is a Redhat bug. |
Only FYI regarding 3.18. /tmp : Temporary files 3.18.1. Purpose The /tmp directory must be made available for programs that require temporary files. Programs must not assume that any files or directories in /tmp are preserved between invocations of the program. Rationale IEEE standard POSIX.1-2008 lists requirements similar to the above section. Although data stored in /tmp may be deleted in a site-specific manner, it is recommended that files and directories located in /tmp be deleted whenever the system is booted. FHS added this recommendation on the basis of historical precedent and common practice, but did not make it a requirement because system administration is not within the scope of this standard. http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s15.html 5.15. /var/tmp : Temporary files preserved between system reboots 5.15.1. Purpose 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. |
Relax-and-Recover (ReaR) Issue Template
Relax-and-Recover 2.00 / Git
x86
Hello,
This is informational only, we use SSHFS to run ReaR for backups. During a backup, SSHFS creates a working area mount point in /tmp. The mount is /tmp/rear.xxxxxxxx/outputfs.
We always run backups during the overnight hours, and noticed files were being deleted from our backup servers. After searching for three months on why our backups were deleted we found the issue.
Redhat 6 & 7 has utilities called tmpwatch and tmpfiles that run daily. These utilities delete files greater than 10 days old from
/tmp
and/var/tmp
. So during the night when ReaR was backing up a server and if tmpwatch started at the same time, tmpwatch would traverse/tmp
and delete backups greater that 10 days old on our backup server.The resolution was to change the location of TMPDIR in the local.conf.
Thanks,
John
The text was updated successfully, but these errors were encountered: