I am having trouble with my linux server. Yesterday I created a lot of directories and files that i no longer want/need. Is there a way to restore my system back to how it was a couple of days ago? Thanks in advance.
1 Answer
I'm afraid it is not possible, if there isn't setup any preliminary backup solution.
For example if you are using LVM you can create snapshots of your file-system before taking steps that you would like to cancel later on. In case it is not possible to setup LVM you can use some other backup solution. Here are presented few examples: Simple Backup Solution. Also here are presented the solutions that I'm using on my Ubuntu systems: https://github.com/pa4080/simple-backup-solutions
-
Thanks for that. Unfortunately i don't have any back ups atm. As i have just started on the server edition. Ill follow these steps in the future.– FredNov 22, 2018 at 8:57
find -delete
them (where you use a -mtime possibly to limit the results to the last 24 (48, 72) hours. Use thefind
firstly to verify the results, then add the -delete to actually delete what it found. This is a rough idea (the find could also match some system files, logs etc that were modified in that time period, why I mentioned the non-system-directory at the start; though this too could possibly be worked around).