0

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.

4
  • 1
    Not generally. Have you got any backup from that time?
    – Melebius
    Nov 22, 2018 at 8:48
  • No. I think i have learnt my lesson with this one. I didn't think i needed it as i have just started and experimenting with Ubuntu server. But i went to far to just reinstall the OS. Going to make automatic backups from now on.
    – Fred
    Nov 22, 2018 at 12:43
  • 1
    If what you created (directories and files) were not in a system directory; you could always find -delete them (where you use a -mtime possibly to limit the results to the last 24 (48, 72) hours. Use the find 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).
    – guiverc
    Nov 22, 2018 at 12:48
  • Thank you for the suggestion. I am going to give that a try. I take it that you can select from the list which ones you can delete.
    – Fred
    Nov 22, 2018 at 12:51

1 Answer 1

0

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

1
  • 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.
    – Fred
    Nov 22, 2018 at 8:57

You must log in to answer this question.

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