LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 08-19-2009, 08:07 AM   #1
Iketani
LQ Newbie
 
Registered: Apr 2006
Posts: 5

Rep: Reputation: 0
Config file rocovery affter running etc-updare. Is it possible?


Hello,
Affter doing etc-update to update config files in /etc, i made one little mistake, and so let etc-update to replace my postfix configuration file, and by so doing my personal mail server is on strike, won't work like it used to. I know i should have made /etc backup, for that i am ready to face it and rewrite that configuration eventualy.

However this got me interested and i started to google, search forums, and i have been unfortunate to find any usefull info about the matter.
So i want to ask you if you know any possible ways to restore that particular configuration file if you have made etc-update and it got replaced by mistake, and you only noticed it affter server reboot?

Last edited by Iketani; 08-20-2009 at 05:24 AM.
 
Old 08-20-2009, 07:56 AM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Switzerland
Distribution: Gentoo
Posts: 474

Rep: Reputation: 38
I am sorry, but etc-update overwrites the target file using "mv" and doesn't take backups.
 
Old 08-21-2009, 11:13 AM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 3,852

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
I think that dispatch-conf has that capability, at least there's a config_archive feature present in /etc/dispatch-conf.conf, which I guess, is the path where to save the backups. So the only solution would be to use dispatch-conf instead of etc-update.
 
Old 08-21-2009, 09:45 PM   #4
d2_racing
Gentoo support team
 
Registered: May 2009
Location: Ste-Foy,Québec,Canada
Distribution: Gentoo
Posts: 115

Rep: Reputation: 17
It can be a great help that little feature :P
 
Old 08-21-2009, 10:00 PM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 3,852

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
However, if you want to use etc-update or you are not comfortable with dispatch-conf you can always set up a cron job to backup your etc directory. You could as well design a bash wrapper around etc-config to backup etc after running etc-update. Truly, you could even use diff on that script to compare the backup with the final etc contents, and save only the diff instead of the whole backup.

Such is the beauty of linux, there's almost always a simple way to combine a couple of tools to do what you want.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem affter removing sec master Byenary Linux - Software 2 09-15-2005 05:45 PM
I have an XF86 config file for video, how do I turn it into XORG config lowpingnoob Linux - Newbie 18 06-12-2005 01:07 PM
Running Firestarter: Missing config file ! Biased turkey Mandriva 4 01-20-2005 09:42 AM
Can you create a config file from a running kernel? sparky8023 Linux - Newbie 3 12-03-2003 11:42 AM
Lan Config file / internet config file Raven_X_Neo Linux - Networking 1 10-30-2002 02:05 PM


All times are GMT -5. The time now is 09:19 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration