Stupid end-user tricks: darcs for /etc and /boot
Michael T. Richter
ttmrichter at gmail.com
Tue Jun 20 04:57:08 UTC 2006
Having grown tired of hand-recovering from a system damaged by a
combination of my cluelessness and some software's arrogance at
adjusting things at random (I'm looking at whichever package constantly
modifies my menu.lst for GRUB here....), I found an amazingly simple way
to keep track of changes to my configuration files, boot files, etc.
that is simpler and faster than using tar, et al to make backups.
There is a one-time preparation step you need to perform to use this:
$ sudo apt-get install darcs
After that run the following commands twice: once in /etc, once
in /boot. (You can probably find other places where this would help
too, but these are the two directories that matter most to me right
now.)
$ sudo darcs init
$ sudo darcs add -r *
$ sudo darcs record -am "Initial check-in."
You now have a version-controlled repository of your /etc and /boot
directories. If you make any changes to these directories, or if you
have changes made from under you, you'd type:
$ sudo darcs add -r *
$ sudo darcs record -am "<insert explanation of change>"
This updates the version control repository with your changes (and with
any new files). Then, if at any point you have to recover an earlier
configuration, you can type the various darcs commands (for this I'll
leave you to the man page or the manual found at http://www.darcs.net)
used for recovering old versions.
Be aware here that darcs will occupy additional space (duh!), and that
if you have your boot partition too small you may not be able to do this
trick. For example, my boot configuration:
isolde:/boot$ sudo du -s .
Password:
104649 .
isolde:/boot$ sudo du -s _darcs
69904 _darcs
As you can see, _darcs is occupying a pretty big chunk of my /boot
partition's data, but given that I'm messing around with kernels and
kernel patches, it's worth it to me.
--
Michael T. Richter
Email: ttmrichter at gmail.com, mtr1966 at hotpop.com
MSN: ttmrichter at hotmail.com, mtr1966 at hotmail.com; YIM:
michael_richter_1966; AIM: YanJiahua1966; ICQ: 241960658; Jabber:
mtr1966 at jabber.cn
"I think it is very beautiful for the poor to accept their lot [...]. I
think the world is being much helped by the suffering of the poor
people." --Mother Theresa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060620/6f645a9b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060620/6f645a9b/attachment.sig>
More information about the ubuntu-users
mailing list