Skip to content

Instantly share code, notes, and snippets.

@toddkaufmann
Last active October 8, 2016 18:51
Show Gist options
  • Save toddkaufmann/8c59c72f20fc9d39b04d0635004bcd75 to your computer and use it in GitHub Desktop.
Save toddkaufmann/8c59c72f20fc9d39b04d0635004bcd75 to your computer and use it in GitHub Desktop.
etckeeper cheatsheet
* etckeeper
it's so sasy just do it
TODO: how to sync / centralize / push to other server ?
(at least backup/sync the .git folder and you should be safe)
#VCS="git"
VCS="bzr"
# Above was the default in etckeeper.conf;
# changing from default bzr: use the lines below
# not necessary for 16.04
# use yum, rpm, or whatever is appropriate; here, we'll assume debian:
apt-get install etckeeper
etckconf=/etc/etckeeper/etckeeper.conf
echo default before: `grep '^V' $etckconf`
perl -pi -e 's/^#VCS="git"/VCS="git"/; s/^VCS="bzr"/#VCS="bzr"/;' $etckconf
echo default after: `grep '^V' $etckconf`
# then type:
etckeeper init
cd /etc
git status # see what's been added (Ubuntu 16.04 will commit for you, you'll see list of what was added scroll by)
git commit -m 'initial commit'
# the rest will be done automatically on a daily basis if you forget, but your manual commits will be more memorable.
# back up /etc/.git or push your repo somewhere
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment