net/openldap24-server: Upon shutdown, backup database in LDIF form.
The upcoming OpenLDAP 2.5 update requires a format change to mdb
databases. It is mandatory for existing slapd-mdb(5) databases to
be exported via an OpenLDAP 2.4 slapcat prior to upgrade, then
reloaded via an OpenLDAP 2.5 slapadd after upgrade.
To make sure that the user always have a backup somewhere, introduce
a backup mechanism (enabled by default, and may be disabled by setting
rc.conf variable slapd_autobackup_enable to "NO") in the slapd rc.d
script upon shutdown.
By default, the backups will be stored at /var/backups/openldap and
a total of 8 backups will be kept, with the oldest backup overwritten
as needed. Backups are compressed using zstd, or, when zstd is not
available, using gzip. The compression can be disabled by setting
slapd_autobackup_compress to "NO", if desirable (e.g. if /var/backups
is located on a file system that is capable of doing compression,
like ZFS).