1 Install etckeeper
yum install etckeeper etckeeper-bzr
2 Configure etckeeper to use bzr
vi /etc/etckeeper/etckeeper.conf
# The VCS to use.
# VCS="hg"
#VCS="git"
VCS="bzr"
# VCS="darcs"
# Options passed to git commit when run by etckeeper.
#GIT_COMMIT_OPTIONS=""
# Options passed to hg commit when run by etckeeper.
#HG_COMMIT_OPTIONS=""
# Options passed to bzr commit when run by etckeeper.
#BZR_COMMIT_OPTIONS=""
# Options passed to darcs commit when run by etckeeper.
#DARCS_COMMIT_OPTIONS=""
# Uncomment to avoid etckeeper committing existing changes
# to /etc automatically once per day.
#AVOID_DAILY_AUTOCOMMITS=1
# Uncomment to avoid etckeeper committing existing changes to
# /etc before installation. It will cancel the installation,
# so you can commit the changes by hand.
#AVOID_COMMIT_BEFORE_INSTALL=1
# The high-level package manager that's being used.
# (apt, pacman-g2, yum etc)
HIGHLEVEL_PACKAGE_MANAGER=yum
# The low-level package manager that's being used.
# (dpkg, rpm, pacman-g2, etc)
LOWLEVEL_PACKAGE_MANAGER=rpm
3 Initialize etckeeper
etckeeper init
4 Push your etckeeper to a save location
bzr push sftp://server/source/etckeeper
bzr bind sftp://server/source/etckeeper
X Create the list of packages
rpm -qa --qf "%{NAME}\n" | sort > installed_rpm_list.txt
X Reinstall fedora
Reinstall fedora.
Reload Packages
Copy the install_rpm_list.txt back to your home directory and reinstall the packages using
yum install $(cat installed_rpm_list.txt)
Useful Links
No comments:
Post a Comment