Putting a server's config under CVS by snarfing /etc
Much as I love Suse there is the buisness of OS upgrades. Upgrading tends to leave cruft so I always do clean installs. At a minimum, I preserve a seperate /home partition with a copy of the old /etc/directory in it. Once build then comes the nightmare of re-implementing all the config changes that defined that machine. What I want to do is put the whole /etc/ directory under CVS. (A cron job would take nightly snapshots and capture any un-comitted changes.) That way the upgrade aftermath nightmare becomes a systematic CVS merge operation, bringing the old /etc branch back onto the new install. Then CVS will hold the differences from a stock Suse install for system recovery. Useful also when there are multiple sysadmins, (or one absent-minded one). Anyone played with something like this? How would CVS cope with the web of links in /etc/init.d? michaelj -- Michael James michael.james@csiro.au System Administrator voice: 02 6246 5040 CSIRO Bioinformatics Facility fax: 02 6246 5166
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 28 May 2003 03:51 am, Michael.James@csiro.au wrote:
Much as I love Suse there is the buisness of OS upgrades.
Upgrading tends to leave cruft so I always do clean installs. At a minimum, I preserve a seperate /home partition with a copy of the old /etc/directory in it.
Once build then comes the nightmare of re-implementing all the config changes that defined that machine.
What I want to do is put the whole /etc/ directory under CVS. (A cron job would take nightly snapshots and capture any un-comitted changes.)
That way the upgrade aftermath nightmare becomes a systematic CVS merge operation, bringing the old /etc branch back onto the new install. Then CVS will hold the differences from a stock Suse install for system recovery.
Useful also when there are multiple sysadmins, (or one absent-minded one).
Anyone played with something like this? How would CVS cope with the web of links in /etc/init.d?
I have thought about this myself in the past. Here are a couple of thoughts: - - cvs does not handle symlinks. They are generated by insserv and contain no content so there's no need to keep them under revision control - - You can't remove directories in cvs without modifying the repository directly - - You should only control files that you have changed. Stuff like /etc/sysconfig/* and /etc/mail/*. What I would do is check against the RPM database with rpm -V. If the MD5sum changed, the file should be controlled. If not, then you are using defaults - - Use subversion instead of cvs. It's probably better suited to this kind of thing because you can remove directories and it versions the entire repository instead of individual files All of that said, I find myself using the YaST2 backup because it only backs up changed or new files. That way I don't use so much space and I get stuff I forget about. - -- James Oakley Engineering - SolutionInc Ltd. joakley@solutioninc.com http://www.solutioninc.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE+1K/k+FOexA3koIgRAjBfAKCZE5ejKDbN+LI/sAT1nh6xXVcs/wCfd4s8 Mp+ILXHj5dWgdWXuKRmWYt8= =yRUf -----END PGP SIGNATURE-----
In a previous message, James Oakley wrote:
I find myself using the YaST2 backup because it only backs up changed or new files. That way I don't use so much space and I get stuff I forget about.
I asked about this tool a while back, but no one seemed to know what it actually did. Could you explain? Is it a simple copy of all files that aren't as installed by the install tool? How reliable is the restore tool? TiA John -- John Pettigrew Headstrong Games john@headstrong-games.co.uk Fun : Strategy : Price http://www.headstrong-games.co.uk/ Board games that won't break the bank Valley of the Kings: ransack an ancient Egyptian tomb but beware of mummies!
The 03.05.28 at 13:49, John Pettigrew wrote:
I asked about this tool a while back, but no one seemed to know what it actually did.
I remember. I had not tried the version on 8.1 yet.
Could you explain? Is it a simple copy of all files that aren't as installed by the install tool? How reliable is the restore tool?
It makes a list of all files that got installed from rpms, and that have been modified, and creates a backup from them. It can also include (optional) all files not included in any rpm - note that if you add new configuration files they are not saved by default - and also information about partitions and the list of rpms installed, so that Yast can recreate the install. As for how reliable is the restore, I don't know. It is a tar.gz of tars (not a simple tgz). -- Cheers, Carlos Robinson
In a previous message, Carlos E. R. wrote:
It makes a list of all files that got installed from rpms, and that have been modified, and creates a backup from them. It can also include (optional) all files not included in any rpm - note that if you add new configuration files they are not saved by default
Hmmm. I think I'll stick to a proper backup tool. If it doesn't back everything up then it's not a backup! John -- John Pettigrew Headstrong Games john@headstrong-games.co.uk Fun : Strategy : Price http://www.headstrong-games.co.uk/ Board games that won't break the bank Knossos: escape the ever-changing labyrinth before the Minotaur catches you!
The 03.05.28 at 21:34, John Pettigrew wrote:
Hmmm. I think I'll stick to a proper backup tool. If it doesn't back everything up then it's not a backup!
It backups every file included on the rpms that has been modified, by default, and optionally, all those files not included on any rpm. There is not much sense in saving everything that came on the CDs... and it saves a lot of space. -- Cheers, Carlos Robinson
In a previous message, Carlos E. R. wrote:
The 03.05.28 at 21:34, John Pettigrew wrote:
Hmmm. I think I'll stick to a proper backup tool. If it doesn't back everything up then it's not a backup!
It backups every file included on the rpms that has been modified, by default, and optionally, all those files not included on any rpm. There is not much sense in saving everything that came on the CDs... and it saves a lot of space.
Yes, but (by the sound of it) it doesn't back up things installed by another route, all files in /home etc. It just sounds a little unsafe to me compared to an rsync of the complete disc. OK, that takes a lot of space, but if that brings peace of mind then it's worth it. A hint to SuSE - document your backup tool! John -- John Pettigrew Headstrong Games john@headstrong-games.co.uk Fun : Strategy : Price http://www.headstrong-games.co.uk/ Board games that won't break the bank Valley of the Kings: ransack an ancient Egyptian tomb but beware of mummies!
The 03.05.29 at 10:09, John Pettigrew wrote:
It backups every file included on the rpms that has been modified, by default, and optionally, all those files not included on any rpm. There is not much sense in saving everything that came on the CDs... and it saves a lot of space.
Yes, but (by the sound of it) it doesn't back up things installed by another route, all files in /home etc.
As a matter of fact, it does backup everything - that is, everything that was not distributed by suse, or that has been modified. Everything in /home/*, for example, is saved. But, for example, /bin/rpm is not, because you get it from the CD. It is not the default, but halfways it directly asks you if you want to backup everything... Mmmm... I have the doubt now about patches.
It just sounds a little unsafe to me compared to an rsync of the complete disc. OK, that takes a lot of space, but if that brings peace of mind then it's worth it.
Of course, it is more straight forward, and safer. As a matter of fact, I would prefer the way Ghost does it, partition data, format, everything. But that is a comercial program, and does not suppoert reiserfs, as far as I know.
A hint to SuSE - document your backup tool!
As a matter of fact, it is documented O:-) http://localhost/usr/share/doc/packages/suselinux-userguide_en/html/node8.ht... Creating a System Backup ------------------------ The YaST2 backup module enables you to create a backup of your system. The backup created by the module does not comprise the entire system, but only saves information about changed packages and copies of critical storage areas and configuration files. Define the kind of data to save in the backup. By default, the backup includes information about any packages changed since the last installation run. In addition, it may include data that does not belong to packages themselves, such as many of the configuration files in /etc or in the directories under /home. Apart from that, the backup can include important storage areas on your hard disk that may be crucial when trying to restore a system, such as the partition table or the master boot record (MBR). But that's all it says - well, no, there is another paragraph under "restore" - but that is too litle. -- Cheers, Carlos Robinson
participants (4)
-
Carlos E. R.
-
James Oakley
-
John Pettigrew
-
Michael.James@csiro.au