I deleted my /etc !!!!!

Everything about it! Heard the news? What! is Ubuntu bankrupt? Has Mandriva started marketing? Have you taken a sky diving course?
We just need to know! No flaming! And we hate spammers -Get it?

Moderators: b1o, jkerr82508

User avatar
viking60
Über-Berserk
Posts: 9285
Joined: 14 Mar 2010, 16:34

I deleted my /etc !!!!!

Postby viking60 » 27 Oct 2016, 13:19

Well as you all know backups are for chickens....but yesterday I manged to remove my /etc :!: :!: :!:
Image
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
and that of course did not remove the etc directory on the USB drive but the /etc on my main box :oops:

Stupid stupid stupid :f

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.

:wall:

Yeah that is bad :C 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 :T :-D

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....
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
dedanna1029
Sound-Berserk
Posts: 8499
Joined: 14 Mar 2010, 20:29
Contact:

Re: I deleted my /etc !!!!!

Postby dedanna1029 » 20 Jun 2019, 22:51

Oh, holy crap!
Even worse is no one else but me noticed!
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

Blackcrack
Posts: 218
Joined: 02 Apr 2013, 08:31

Re: I deleted my /etc !!!!!

Postby Blackcrack » 21 Jun 2019, 03:45

whoot.. eh how long we are linux-addicted ?
the first rule,

1. never touch a running system
2. make script-backuptools.
3. safe it, before it to late "tar cfvz /mnt/save/save/save/etc-%date%.tar.gz /etc"


:coffee_smile:

best regards
Blacky

User avatar
dedanna1029
Sound-Berserk
Posts: 8499
Joined: 14 Mar 2010, 20:29
Contact:

Re: I deleted my /etc !!!!!

Postby dedanna1029 » 26 Jun 2019, 23:04

We have those things. Sometimes however, we get busy, and plus, it's a lot more fun to screw a system up and then fix it lol. Anything else is just plain boring.
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html


Return to “The Lounge”