Forums

Files in /tmp wiped?

Hello,

I am coming back to an old project that I was working on and kept the DB for it in /tmp.. It looks like my files in that folder were deleted on 12/12/13 sometimes between 8 and 9am PST.

Is there something that happened on this day that caused this? Is this a bad place to keep files?

Hmm, do you mean your own 'temp' directory, e.g. /home/username/temp ?

I still have a file in mine from Nov 2013.

Jim

Nope, I mean /tmp, siting in the same root dir as /home and /var

I have a script that snapshots the db every hour and makes a backup of it, all of a sudden after 6+months of no problems and me not touching the site for months on end, I went to go login and found that the DB files had reverted to it's base schema (indicating the DB was deleted and first time setup ran).

I checked my backup archives that I have running through the scheduler and sure enough, the DB is 40KB one minute and 0KB the next.

Yes, /tmp is a bad place to keep data generally on Unix systems -- it normally gets wiped whenever the machine is restarted. We don't wipe your data quite as frequently as that, but /tmp really is only for temporary things. If you want stuff to be kept, then somewhere in your home directory is best.

Thanks giles :) That was my assumption, I just wanted to make sure something else wasn't amiss. Thanks for the quick support!

No problem, glad to help :-)