CONFIGSNAP(1)

πŸ“¦
version 0.20.1 Β· 2 versions
, in fedora 43

πŸ’… CONFIGSNAP πŸ’…

okay so bestie, welcome to CONFIGSNAP(1) β€” that's the User Commands manual, and we're on version 0.20.1 ✨ she takes a lil snapshot of your system state so you can compare vibes later, and honestly? iconic behaviour. let's get into it 🫢


🌸 NAME 🌸

configsnap β€” manual page for configsnap 0.20.1. that's literally her whole government name, no notes πŸ’–

✨ SYNOPSIS ✨

configsnap [options]

...that's the entire summoning ritual. go off πŸͺ„

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜• β€” configsnap records useful system state information πŸ“Έ like, it jots down what your system was giving at a given moment. and if you run it with a PHASE containing "post" or "rollback", she'll compare what she just grabbed against the previous state. diff queen behaviour, we stan. πŸ”₯

and if you want extra stuff in the mix β€” more files, more directories, more commands β€” you can hand her an optional file, /etc/configsnap/additional.conf, and she'll register those too during configsnap execution. customizable. main character energy. πŸ’…


πŸ‘‘ OPTIONS πŸ‘‘

  • -h, --help β€” show this help message and exit. the "wait what do you even do" button 🫢
  • -w, --overwrite β€” if phase files already exist in the tag dir, remove previously collected data with that tag. out with the old, bestie πŸ—‘οΈ
  • -a, --archive β€” pack output files into a tar archive. a cute lil bundle πŸŽ€
  • -v, --verbose β€” print debug info. she will NOT stop talking and we love that for her πŸ—£οΈ
  • -V, --version β€” print version.
  • -s, --silent β€” no output to stdout. quiet luxury, she's mysterious now 🀫
  • --force-compare β€” Force a comparison after collecting data. yeah she's comparing whether you asked nicely or not πŸ’€
  • -t TAG, --tag=TAG β€” tag identifer (e.g. a ticket number). label your lil snapshot 🏷️
  • -d BASEDIR, --basedir=BASEDIR β€” base directory to store output. where the receipts live πŸ“‚
  • -p PHASE, --phase=PHASE β€” phase this is being used for. Can be any string. Phases containing post or rollback will perform diffs. okay this one is the whole plot twist ✨
  • -C, --compare-only β€” Compare existing files with tags specified with --pre and --phase. no collecting, just comparing β€” she's in her analysis era πŸ”
  • --pre=PRE_SUFFIX β€” suffix for files captured at previous state, for comparison.
  • -c CONFIG, --config=CONFIG β€” additional config file to use. Setting this will overwrite default.
⚠️ heads up on that last one: setting -c CONFIG / --config=CONFIG overwrites the default. it does not politely add to it. she's replacing. periodt.

πŸ—‚οΈ FILES πŸ—‚οΈ

  • /etc/configsnap/additional.conf β€” Optional configuration file to define additional command output and files to collect.

now the part where you actually have to pay attention πŸ‘€ β€” Commands are all run as root, so the custom collection configuration file must be owned by root and not read or writable by other users. like, fr fr, do not play with this one bestie, that's a real security thing 🚨 The file format is:

All custom file collections in the additional.conf file must begin with a "[section]" which contains the following options.

Type=

Can take values Command, File, or Directory depending on the action that needs to be performed.

  • If Type=Command then the output from the specified command will be save to a file named after the section. The command must be specified using the full path to the executable. e.g. /bin/ss -tanp. Command supports several additional configuration options.
  • If Type=File then the specified file will be save to the backup directory with suffix matching the stage. The full path to the file must be used. Type=File supports the same FailOk and Compare options as Command.
  • If Type=Directory then the contents of the directory will be a subfolder of the same name within the backup directory. The path to the directory should include a trailing /. Directory supports the FailOk, Compare (see Type=Command), and the following.

Sort=

Whether to sort the output of the command, (default: False)

FailOk=

Report errors when configsnap runs this section, (default: False)

Compare=

Produce a diff between the pre/post files when running configsnap, (default: False)

File_Pattern=

Rather than saving every file in a directory, backup only ones matching the Python regex pattern, (default: .*). See Examples below.

Examples

# Recording the output of a command into a "psspecial.<phase>" file containing the output.
[psspecial]
Type: command
Command: /bin/ps -aux
Compare: True

# Recording an additional file, stored as "debconf.<phase>"
[debconf.conf]
Type: file
File: /etc/debconf.conf
Failok: True

# Recursively Recording all files from /etc/ssh/ directory, with sub-files appended with ".<phase>".
[ssh]
Type: directory
Directory: /etc/ssh/

# Recording all files from /etc/fail2ban/ directory matching '.*\.local$', with sub-files appended with ".<phase>"
[fail2ban]
Type: directory
Directory: /etc/fail2ban
File_Pattern: .*\.local$

and that's the whole page bestie, you ate that πŸ’– this was configsnap 0.20.1, dated July 2025 β€” go snapshot something and feel powerful. mwah. πŸ’…βœ¨

πŸ“¦ where this page comes from