1

So here is something I am always wondering about when setting up a new Linux machine, be it desktop or server: How can I keep a reproducible log of what administration tasks I did on the machine, so when it fails I can get back to an identical running system quickly?

I know there is a lot of configuration management tools like Ansible, bcfg2, Puppet and what not, but it feels like the overhead of describing the target state in one of their configuration languages is way too high for a single server, in particular if it is only my private machine with no critical or revenue-generating service on it. Also, I haven't found a good way of describing an action like "uncomment this line, but keep the previous line for reference" in either Ansible or bcfg2 without copying the whole file to my configuration management.

My current solution is to keep a file "adminlog.txt" on every machine and write in there what I did in natural language. As of now, I have never had to go back to that file and reproduce all the things in there, but I am sure that once I have to do this, all the links in lines such as "set up Dovecot as per <link>" will be dead or describe outdated versions.

In a comment to another question I found a link to blueprint which promises something like "capture the current state of your server and store it as bash/Puppet/chef/CFEngine file". Actually that sounds exactly what I am looking for, but then the development seems to have halted and it seems only to work on Debian or RPM distributions.

I would be happy to learn how other people keep track of their administration tasks, in particular when there are multiple people doing stuff on the same server; it seems like not such an exotic requirement, after all.

  • 1
    We use ansible, puppet, etc. The overhead is not high at all, when multiple admins are involved. – Michael Hampton Oct 26 '15 at 14:21
  • so when it fails I can get back to an identical running system quickly? - as Ryan Bolger answers, that's exactly what a backup is for. Apart from that, it's also what a virtual machine template is for - do the setup once and create a template before you put real data on it, then you can deploy one or many new servers with all the working state configured, without having to redo it manually. – TessellatingHeckler Oct 26 '15 at 18:02
1

It's certainly not as sexy as setting up configuration management. But for a single, personal server, why not just use a traditional backup utility?

  • Do you mean, rsyncing the whole / directory to an external location? Well, that might be possible, but I guess (the non-userdata part of) it would consist of 95% files identical to original package contents...? – tgpfeiffer Oct 26 '15 at 23:05
  • I'm not terribly familiar with Linux based backup solutions, but I was assuming something block based rather than file based. Bottom line though, yes. Whether you're backing up default system files is irrelevant as long as you have everything you need to restore a working system from scratch. If your server is a VM, it's that much easier. – Ryan Bolger Oct 27 '15 at 2:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.