LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-24-2007, 01:44 PM   #1
powah
Member
 
Registered: Mar 2005
Distribution: FC, Gentoo
Posts: 276

Rep: Reputation: 30
last known good configuration


Is there a way to setup a last known good configuration for some
configuration files?
e.g. /etc/ssh/sshd_config
I want to save some configuration files in case the computer go wrong
and I can restore a good configuration file.
Is Samhain or Aide overkill for my purpose?
or do I write my own program?
 
Old 10-24-2007, 02:16 PM   #2
ehawk
Senior Member
 
Registered: Jul 2003
Posts: 1,257

Rep: Reputation: 48
Quote:
Originally Posted by powah View Post
Is there a way to setup a last known good configuration for some
configuration files?
e.g. /etc/ssh/sshd_config
I want to save some configuration files in case the computer go wrong
and I can restore a good configuration file.
Is Samhain or Aide overkill for my purpose?
or do I write my own program?
Often, when editing files, the file which is altered is saved under some variation of the original name, maybe with extensions like .old or with a ~ mark. You can easily save your current, last known good configuration file this way, save it as config.old or config.good if you like, before editing the file in question. You can also use the cp command to make a copy with a different name before you alter the good configuration file. If things go wrong, you can simply use the cp command on the saved config.good file to overwrite the incorrect config.new file.

Hope this helps
http://www.computerhope.com/unix/ucp.htm
 
Old 10-24-2007, 02:42 PM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Well I would think you would backup your configuration files as part of your normal backup procedure.. at the very least tar em all up (could tar the entire /etc folder.. ) and move em to another Drive or even better a separate PC.


Of if you are not the backup regularly type just copy the config file before you edit it..

cp /etc/ssh/sshd_config /etc/ssh/sshd_config.2007_10_24.bak
vim /etc/ssh/sshd_config
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A good Pc configuration for Software developement AbhishekSlam Programming 1 08-09-2007 07:54 PM
LXer: Reviewer finds Ubuntu good, but not good enough LXer Syndicated Linux News 0 01-05-2006 06:01 AM
Recommend a good BitTorrent client, and a good CD ripper? audiorevolution Linux - Software 6 06-07-2005 06:36 AM
Good morning, Good evening, Good night. Cheeseboy LinuxQuestions.org Member Intro 2 11-04-2004 09:46 PM
A Good Read... good content on this machine Banshee Linux - Newbie 0 08-06-2002 12:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:31 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration