Last active
October 8, 2016 18:51
-
-
Save toddkaufmann/8c59c72f20fc9d39b04d0635004bcd75 to your computer and use it in GitHub Desktop.
etckeeper cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 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