tmp files restore when system rebooted

0

i have files in tmp folder in Ubuntu it got lost due to system reboot can some one guide how to restore

robox
demandé il y a 10 mois485 vues
1 réponse
2

Is your /tmp mounted as a tmpfs filesystem? Looks at the first column in the output of df -h /tmp, if it says tmpfs then the filesystem is in the system's memory which is volatile, and any contents will be lost after a reboot.

You won't be able to get these files back I'm afraid.

If /tmp is disk-based but its contents are still being deleted on a reboot, then it may be because of a setting in the systemd-tmpfiles service https://manpages.ubuntu.com/manpages/kinetic/man8/systemd-tmpfiles.8.html

You may find this is set to clear everything out of /tmp whenever they system boots, or delete certian types of files, or files over a certain age, etc. - there are too many options to go through here.

Of course, if /tmp is a tmpfs filesystem then this second part of the answer is irrelevant.

profile picture
EXPERT
Steve_M
répondu il y a 10 mois
profile picture
EXPERT
vérifié il y a 10 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions