Questions tagged [etckeeper]

etckeeper is a tool for using a version control system to store server configuration in git.

etckeeper manages /etc be stored in git, mercurial, bazaar, or darcs repository. By default each of the commands operates on /etc, but a different directory can be specified to operate on a clone of the /etc repository located elseware.

etckeeper also stores permissions and meta data about configurations stored in /etc

Sometimes the repository can become huge, in which case the repository needs to be garbage collected.

19 questions
4
votes
1 answer

Create meaningful etckeeper commit messages

I want to keep track of the /etc changes with etckeeper Unfortunately, the commit messages are the same for all commits saving uncommitted changes in /etc prior to emerge run I wish there would be something more descriptive like apt-get install…
Jonas Stein
  • 3,898
  • 4
  • 34
  • 55
4
votes
1 answer

Update and commit changed file permissions in etckeeper

Say I had to change the permissions of some file in /etc/ssl to allow a program to read a private key file: $ cd /etc $ chgrp ssl-cert ssl/private/key.pem $ chmod g+r ssl/private/key.pem $ git status On branch master nothing to commit, working…
Fritz
  • 632
  • 2
  • 6
  • 16
4
votes
1 answer

How to make clean commits with etckeeper?

I would like to make clean commits with etckeeper. Here is what happens: 1) Check the status of the repository : git status On branch master nothing to commit, working directory clean 2) Modify a configuration file : vi myfile.conf 3) Add it to…
Ortomala Lokni
  • 4,665
  • 3
  • 31
  • 58
3
votes
1 answer

Let etckeeper monitor /var/spool/cron too

etckeeper should log all config changes on a system. But there is one important setting that is outside of /etc/: crontab -e edits a file inside: /var/spool/cron/ so there are important config files on the server. How do I include those files to the…
rubo77
  • 27,777
  • 43
  • 130
  • 199
2
votes
0 answers

Debian/Ubuntu apt pre-install hook for logging/commit messages?

This is related to Create meaningful etckeeper commit messages. I've patched /etc/etckeeper/pre-install.d/50uncommitted-changes as follows (to add support for a "PRECOMMIT" file): #!/bin/sh set -e PRECOMMIT=/root/.etckeeper/pre-install.txt if…
Jim Dennis
  • 600
  • 2
  • 11
2
votes
0 answers

Rollback misconfigured network settings in systemd using etckeeper?

I was thinking how to automatically rollback network misconfigurations with etckeeper and systemd. Workflow: # etckeeper commit # $EDITOR /etc/systemd/network/wired.network # systemctl restart systemd-networkd You broke the network! I'm calling your…
raspi
  • 1,353
  • 1
  • 13
  • 24
2
votes
0 answers

Using gitk to view changesets in a linux server using etckeeper?

gitk is a pretty good tool for viewing changesets in a git repository. Is there any way to use it locally on my workstation to view/review an etckeeper git repository on a remote server? Also should I clone the repo to my workstation and then…
leeand00
  • 4,443
  • 10
  • 51
  • 78
2
votes
1 answer

What directory does etckeeper store its permissions / metadata in?

In what directory does etckeeper store its metadata and permissions in? I want to know for purposes of testing the restoration of a configuration.
leeand00
  • 4,443
  • 10
  • 51
  • 78
2
votes
0 answers

How do I know when what I should store in my external to /etc configurations in etckeeper?

I read about the ability to store configuration files that live outside of /etc here, and I tested it out on a test server, and it appears to work. One thing that I'm having a bit of an issue with however, is identifying what of these files…
leeand00
  • 4,443
  • 10
  • 51
  • 78
1
vote
1 answer

Push etckeeper created repository to remote Gitlab server, advices welcomed

I'm playing with etckeeper and it seems to be a good product. I use it only to track /etc filesystem locally, but these days the idea came to my mind - to create central Gitlab repository and to store all the node /etc repositories there. The…
1
vote
1 answer

Connecting to SSH authentication agent when running commands with sudo

I use etckeeper to keep my various OS configurations under version control. Until now, I was content to just use a local Git repository to keep track of changes but it occurred to me that I wasn’t making the most of this feature and I decided that…
Anthony Geoghegan
  • 12,605
  • 7
  • 59
  • 62
1
vote
1 answer

Where is official documentation about locking mechanisms for etckeeper, apt, and/or dpkg?

Context: Want to put a lock on etckeeper/apt hook activity during special backup. Objective is to preserve whole package integrity, e.g., wait until any package installation is complete, and then prevent new installation from starting until special…
Craig Hicks
  • 644
  • 8
  • 13
1
vote
1 answer

Is it possible to view past versions of files after a renewed etckeeper init?

So as the terminal was telling me that /etc wasn't a git repository after running git status and gitk resolv.conf & I made a mistake and ran sudo etckeeper init and sudo etckeeper commit "Initial version" which I already ran earlier before realizing…
mYnDstrEAm
  • 4,008
  • 13
  • 49
  • 108
1
vote
2 answers

How can I view diffs or at least older versions of specific files with etckeeper?

So I'm using etckeeper on my machine running Debian 9.1 with KDE and would like to view diffs (or if that isn't yet implemented: past versions) of specific files. How can I do that?
mYnDstrEAm
  • 4,008
  • 13
  • 49
  • 108
1
vote
1 answer

ansible role: Why do I have to set user.email in etckeeper?

I wrote a ansible role to automate installing etckeeper. I discover that git will complain if I haven't configured user.email. In some circumstances, git commits will fail. This includes automatic commits to etckeeper when installing a package,…
sourcejedi
  • 48,311
  • 17
  • 143
  • 296
1
2