Debian – Using the /tmp folder for backups, recommended

backupdebiantmp

Is it safe to put my temporary manual backups of my website codebase and database into the /tmp folder? I'm running Debian 8. I want to leave them there for a couple days. I am not sure if this directory gets overwritten or emptied on it's own.

Thanks!

Best Answer

I would say it is not safe in general. On many systems, /tmp is cleaned on reboot by default. See /etc/default/rcS (TMPTIME defaults to 0),

# delete files in /tmp during boot older than x days.
# '0' means always, -1 or 'infinite' disables the feature
#TMPTIME=0
Related Question