I deleted my /etc !!!!!
Posted: 27 Oct 2016, 13:19
Well as you all know backups are for chickens....but yesterday I manged to remove my /etc
Yes I know-- how is it even possible to be that stupid...so here we go;
I had an old backup on my USB drive.
This drive had a backup from my old Arch server and contained the directories /etc and /home
Since I have replaced that server with a Centos server I thought I'd delete those directories....
So cd into the USB drive and did a and that of course did not remove the etc directory on the USB drive but the /etc on my main box
Stupid stupid stupid
So suddenly my user was completely gone root was gone and those users were gone even if I chrooted into it with my Viking Rescue system.
Yeah that is bad but I was able to download and burn a Manjaro iso with SystemrRescueCD from our eminent rescue system and burn it to a DVD,
I started the Calamares installer and partitioned manually and had the option to keep the old data so I kept /home as is and also chose "keep" on /
That should replace my missing /etc.
I configured my user with the same data and password as before and was able to boot into my environment.
Every config file is there ('cept those in /etc of course) but I need to reinstall all missing programs.
Let this be a lesson to you
I also have this script that backs up my /home on a daliy basis and in there I have pkglist.txt file that contains all installed packages:
I created it like this:
I restored it with:
That should pretty much save my bacon.....depending on how old that file is....
Yes I know-- how is it even possible to be that stupid...so here we go;
I had an old backup on my USB drive.
This drive had a backup from my old Arch server and contained the directories /etc and /home
Since I have replaced that server with a Centos server I thought I'd delete those directories....
So cd into the USB drive and did a
Code: Select all
rm -R /etc
Stupid stupid stupid
So suddenly my user was completely gone root was gone and those users were gone even if I chrooted into it with my Viking Rescue system.
Yeah that is bad but I was able to download and burn a Manjaro iso with SystemrRescueCD from our eminent rescue system and burn it to a DVD,
I started the Calamares installer and partitioned manually and had the option to keep the old data so I kept /home as is and also chose "keep" on /
That should replace my missing /etc.
I configured my user with the same data and password as before and was able to boot into my environment.
Every config file is there ('cept those in /etc of course) but I need to reinstall all missing programs.
Let this be a lesson to you
I also have this script that backs up my /home on a daliy basis and in there I have pkglist.txt file that contains all installed packages:
I created it like this:
Code: Select all
pacman -Qqe | grep -vx "$(pacman -Qqm)" > /path/to/chosen/directory/pkglist.txt
I restored it with:
Code: Select all
sudo xargs -a </pat/to>/pkglist.txt pacman -S --needed
That should pretty much save my bacon.....depending on how old that file is....