VectorLinux
July 23, 2014, 09:46:26 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Theoretical question: soft linking config files  (Read 776 times)
Freston
Vectorite
***
Posts: 165


« on: May 23, 2008, 01:53:22 am »

Hi!

I'm in the process of configuring a remote machine. But my experience tells me that it's hard to keep track of all the changes that I made to the machine.

So I decided to write a script that stores all my original *.conf files in a separate directory rather than my previous practice of making a .bak file in the current directory.




Now I'm wondering... what are the pros and cons for softlinking the config files to actual config files in a separate directory?

For example, /etc/fstab is a soft link to /etc/custom/fstab
The original fstab is stored as /etc/custom/original/fstab
And any changes that I make are in the /etc/custom/fstab
Recent copies of custom config files are stored in /ets.custom/backup


The script is gonna be quite elaborate, but once done I think it's gonna safe me a lot of trouble. But as you might imagine, I am not completely sure of the implications of soft linking any custom configs.


EDIT: This script will work equally well for working with different versions of scripts and plain text files. Maybe the /etc/ directory isn't the most sane place to store backups and originals then... but that is just one variable to adjust.
« Last Edit: May 23, 2008, 02:33:19 am by Freston » Logged
bigpaws
Vectorian
****
Posts: 1843


« Reply #1 on: May 23, 2008, 03:15:37 am »

Since a symlink is seen the same as the actual file, you
shouldn't have any problems.

Create another directory and then just create the symlinks to
the intended location. Then backups and reinstall is relatively easy.

There is also another way which would be time stamps or
search for .bak files.

Just my 0.02

Bigpaws
Logged
Freston
Vectorite
***
Posts: 165


« Reply #2 on: May 23, 2008, 03:52:33 am »

Thanx!

The script is turning out to becoming quite a handy tool. It's now in the phase where I keep thinking about more functionality to add, although the core functionality is working quite nice already.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!