Is the systemd backup-sysconfig.service an undocumented jewel?

I’ve noticed in the /var/log/boot.log the entry “Started Backup of /etc/sysconfig.” occurs at every boot.
Looking into the systemd service and with a recursive “grep” for ‘RCCONFIG_BACKUP_DIR’ in ‘/etc/sysconfig/*’, I discovered that there are regular backups of everything in ‘/etc/sysconfig/’ stored in the ‘/var/adm/backup/sysconfig/’ directory as GZipped Tar files.

Does anyone know if this facility is documented anywhere?

  • I can’t find anything in the openSUSE Documentation related to this “jewel” …
  • Actually, ‘/var/adm/backup/’ contains quite a few regular backups of various system things …

From /usr/share/fillup-templates/sysconfig.backup

Type: string

Default: /var/adm/backup/sysconfig

If you want cron.daily to backup /etc/rc.config and the files in

/etc/sysconfig, specify a directory where the backups will be stored.

(This is recommended!) The backups will be made every time cron.daily is

called and the the content of those files has changed.

Setting the variable to “” disables this feature.

RCCONFIG_BACKUP_DIR=“/var/adm/backup/sysconfig”

But, it ain’t run by cron any more – systemd does the job: ‘backup-sysconfig.service’ and ‘backup-sysconfig.timer’.

  • ‘backup-sysconfig.timer’ indicates that, it’s run daily, with an accuracy of 1 minute and, with a randomised delay of up to 2 hours and, its persistent …

IOW, the comments in the system configuration file are of historical interest only …
[HR][/HR]Maybe a bug report to have the documentation changed to include this information might be, maybe, an idea …

I note that aaa_base-extras contains the following “humble” description…

Description :
The parts of aaa_base that should be installed by default but are not
strictly required to run a system. (Shell aliases, bash completions
and convenience hacks).
Distribution: openSUSE Leap 15.0

It provides three such scripts, two of which are used to backup the rpmdb and sysconfig respectively…

/usr/lib/base-scripts/backup-rpmdb
/usr/lib/base-scripts/backup-sysconfig
/usr/lib/base-scripts/check-battery

Not much to document really (a README might have been sufficient), unless one wants to adjust the timings. (They’re reasonably self-explanatory IMHO.)

I’ve been doing that with (firewall documentation, LDAP server documentation for example) where I find it. I encourage others to do the same where it is apparent. :wink: