0

I intended to delete files under /tmp, however, I accidently did it under the /var folder with root user. I also stupidly hence run systemctl restart mysql :-( Now mysql service cannot start, and there are many messages in the console: enter image description here

How to know which files has been deleted and what are the impacts to services and even Ubuntu OS 20.04?

Thanks in advance!

5
  • 6
    Reinstall, restore your backups. Oct 4, 2023 at 12:42
  • 1
    I would perhaps argue a reinstall is not needed, but boot a live system and restore /var...
    – vidarlo
    Oct 4, 2023 at 13:33
  • @vidarlo Would you pls share me a link of a detailed tutorial?
    – Vincent
    Oct 5, 2023 at 23:14
  • I have no idea how you do backups. Server administration in general doesn't lend itself to detailed tutorials. You should know your environment and how to e.g. do disaster recovery.
    – vidarlo
    Oct 6, 2023 at 7:10
  • Thanks you all. Finally, I sadly gave up.
    – Vincent
    Oct 7, 2023 at 21:27

1 Answer 1

0

Whether it is possible to recover the files depends on various factors. There are several threads with information on how to recover files.

One option would be to try via debugfs: https://stackoverflow.com/a/31884665/22177574

If you are using a ext3/ext4 filesystem (Check via: lsblk -f) another option would be the extundelete tool: https://stackoverflow.com/a/26722784/22177574

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .