Hi, Please I need your help how can I restore and retrieve my /etc folder. Because of my carelessness, I deleted the folder.
Please how can I restore the file without re-installation.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Accidentally deleted the /etc folder
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Accidentally deleted the /etc folder
Restore your backup.
Use this to preserve ACLs and other permissions:
Use this to preserve ACLs and other permissions:
Code: Select all
rsync -aAXv $source $destination
deadbang
-
- Posts: 89
- Joined: 2017-01-17 04:21
Re: Accidentally deleted the /etc folder
Sorry I am new to linux world.Head_on_a_Stick wrote:Restore your backup.
Use this to preserve ACLs and other permissions:Code: Select all
rsync -aAXv $source $destination
Please can you give me the steps on how to do it? I don't know where to find my back up.
-
- Posts: 89
- Joined: 2017-01-17 04:21
Re: Accidentally deleted the /etc folder
It is where you put it. I suspect that you never made a backup.sarksloane wrote:Please can you give me the steps on how to do it? I don't know where to find my back up.
I would boot up a live Debian CD or USB. Then I would copy the entire /etc folder to my system and reboot. There is a slim chance that doing this might get you started. If it doesn't (and there is a big chance it won't) you will have to do a fresh install.
In the future, respect Debian's two tiered security. Avoid Sudo and use su. (Sudo has its uses but you need to learn how to use it safely.) Learn how to make backups.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Accidentally deleted the /etc folder
I was going to suggest that but quite a few things would need to be changed — /etc/fstab being the main obstacle.Bulkley wrote:I would boot up a live Debian CD or USB. Then I would copy the entire /etc folder to my system and reboot.
If the OP has the entire system on one partition then /etc/fstab could be deleted and the system should still boot.
deadbang
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Accidentally deleted the /etc folder
Debian doesn't backup automatically, you need to do this yourself.sarksloane wrote:I don't know where to find my back up.
Having a working backup strategy is the single most important thing to do on your computer, get something organised once you have fixed this mess.
deadbang
Re: Accidentally deleted the /etc folder
sarksloane, i wonder how you managed to accidentally delete all of it?
using a gui filemanager as root?
i just cannot imagine anyone entering 'rm -rf /etc' while being root...
anyhow, you learned two important lessons:
1) be careful. don't use gui apps as superuser, rather trust the terminal.
2) make backups before the crap hits the fan.
using a gui filemanager as root?
i just cannot imagine anyone entering 'rm -rf /etc' while being root...
anyhow, you learned two important lessons:
1) be careful. don't use gui apps as superuser, rather trust the terminal.
2) make backups before the crap hits the fan.
-
- Posts: 89
- Joined: 2017-01-17 04:21
Re: Accidentally deleted the /etc folder
Thank you guys for all of your advise. This mistake was a definitely a very tremendous learning for me and indeed a very big lesson.
I did the re-installation from the beginning.
I did the re-installation from the beginning.