At present, I'm tinkering with Kubernetes on Ubuntu 18.04.6 LTS, and had placed some "important" files in /tmp.
And then I rebooted ....
And, of course, /tmp was cleared ... 🙀🙀🙀🙀
This is, of course, configurable
A quick Google took me here: -
TL;DR; there's a daemon for that: -
which includes: -
Example 3. Create a directory and prevent its contents from cleanup
abrt(1), needs a directory created at boot with specific mode and ownership and its content should be preserved from the automatic cleanup applied to the
contents of /var/tmp:
d /var/tmp 1777 root root 30d
I tested this by creating the requisite file: -
d /tmp 1777 root root 20d
and placed a dummy file in /tmp: -
and then rebooted.
And ... /tmp/dave is still there
Which is nice!