You are not logged in.

#1 2012-11-16 12:36:57

dontbugme
Banned
Registered: 2011-11-04
Posts: 166
Website

query all changed config files

Hi,

I want to reinstall my Arch box.

I have all files and userdata on a seperate partition but what about the config-files? (like in /etc)

I don't remember which configs i changed and which not.
(i don't want to check every single config after reinstall)

Pacman can recognize if a file was changed (when it is creating a .pacnew file) -> is pacman able to tell me all files i have changed? ... so i can save them?

sry about my bad english sad

thx!

Offline

#2 2012-11-16 17:33:36

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: query all changed config files

$ pacman -Qii pacman
Name           : pacman
Version        : 4.0.3-3
URL            : http://www.archlinux.org/pacman/
Licenses       : GPL
Groups         : base
Provides       : None
Depends On     : bash  glibc>=2.15  libarchive>=3.0.2  curl>=7.19.4
                 gpgme  pacman-mirrorlist  archlinux-keyring
Optional Deps  : fakeroot: for makepkg usage as normal user
Required By    : cower  expac-git  pacdep  packer  pacman-contrib
                 pacmanxg4-bin  pcurses  pkgfile  pkgstats  pyalpm
Conflicts With : None
Replaces       : None
Installed Size : 3532,00 KiB
Packager       : Allan McRae <allan@archlinux.org>
Architecture   : i686
Build Date     : wto, 10 lip 2012, 23:45:33
Install Date   : śro, 11 lip 2012, 16:04:45
Install Reason : Explicitly installed
Install Script : Yes
Description    : A library-based package manager with dependency
                 support
Backup Files:
MODIFIED    /etc/pacman.conf
MODIFIED    /etc/makepkg.conf



Edit: Would something like

$ pacman -Qii | grep ^MODIFIED | cut -f2

help?

Last edited by karol (2012-11-16 17:35:58)

Offline

#3 2012-11-16 22:46:46

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,178

Re: query all changed config files

Why not save them all? If they are the same as the default, you'll just end up with the default anyway. Most config files are pretty small so I assume it is not an issue of limited space.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#4 2012-11-17 07:44:57

satanselbow
Member
Registered: 2011-06-15
Posts: 538

Re: query all changed config files

Also check the Pac Tips Wiki page which has a couple of good ones that will include "foreign" or "disowned" files for AUR / manually installed stuff too wink

If you pipe the output to a file you could then use rsync to create your backup with the file tree intact - something like:

# rsync -rR $(< list-of-files.txt) /backup-folder 

Whilst I agree it may actually be simpler to save "all" config files - there would be a lot of redundancy and make the control freak in me cry tears of pure bash sad

Offline

#5 2012-11-17 12:17:16

valr
Member
From: Belgium
Registered: 2012-01-08
Posts: 62

Re: query all changed config files

The very few times I've done it: I've copied old /etc into a temp directory and used meld to merge with the newly installed /etc

Offline

Board footer

Powered by FluxBB