Bug#960449: openldap: fix backup directory naming for multiple reconfigure calls

Andreas Hasenack andreas at canonical.com
Tue May 12 18:42:24 BST 2020


Package: openldap
Version: 2.4.50+dfsg-1
Severity: normal

Dear Maintainer,

Hi,

this is currently part of the ubuntu delta and I checked to see if it
still makes sense. It looks like it does, as it fixes the following
scenario:
```
  Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.50+dfsg-1... done.
  Moving old database directory to /var/backups:

  Backup path /var/backups/unknown-2.4.50+dfsg-1.ldapdb exists. Giving up...
root at sid-slapd-reconfigure:~# echo $?
1
root at sid-slapd-reconfigure:~# ls -la /var/backups/
total 36
drwxr-xr-x  4 root root  4 May 11 14:21 .
drwxr-xr-x 11 root root 13 May  8 05:25 ..
drwx------  3 root root  3 May 11 14:21 slapd-2.4.50+dfsg-1
drwxr-xr-x  2 root root  4 May 11 14:21 unknown-2.4.50+dfsg-1.ldapdb
```
Install `slapd`, run `dpkg-reconfigure slapd` multiple times, and you
get the above.

With the change, you get this (shown in ubuntu):
```
root at groovy-slapd-reconfigure:~# ll /var/backups/
total 18
drwxr-xr-x  2 root root  2 May  6 12:25 ./
drwxr-xr-x 13 root root 15 May  8 11:42 ../
root at groovy-slapd-reconfigure:~# dpkg-reconfigure slapd
  Backing up /etc/ldap/slapd.d in
/var/backups/slapd-2.4.49+dfsg-2ubuntu1... done.
  Moving old database directory to /var/backups:
  - directory unknown... done.
  Creating initial configuration... done.
  Creating LDAP directory... done.
root at groovy-slapd-reconfigure:~# ll /var/backups/
total 36
drwxr-xr-x  4 root root  4 May 11 14:29 ./
drwxr-xr-x 13 root root 15 May  8 11:42 ../
drwx------  3 root root  3 May 11 14:29 slapd-2.4.49+dfsg-2ubuntu1/
drwxr-xr-x  2 root root  4 May 11 14:29 unknown-2.4.49+dfsg-2ubuntu1.ldapdb/
root at groovy-slapd-reconfigure:~# dpkg-reconfigure slapd
  Backing up /etc/ldap/slapd.d in
/var/backups/slapd-2.4.49+dfsg-2ubuntu1... done.
  Moving old database directory to /var/backups:
  - directory unknown... done.
  Creating initial configuration... done.
  Creating LDAP directory... done.
root at groovy-slapd-reconfigure:~# ll /var/backups/
total 61
drwxr-xr-x  5 root root  5 May 11 14:29 ./
drwxr-xr-x 13 root root 15 May  8 11:42 ../
drwx------  3 root root  3 May 11 14:29 slapd-2.4.49+dfsg-2ubuntu1/
drwxr-xr-x  2 root root  4 May 11 14:29 unknown-2.4.49+dfsg-2ubuntu1.ldapdb/
drwxr-xr-x  2 root root  4 May 11 14:29
unknown-2.4.49+dfsg-2ubuntu1.ldapdb-20200511-142930/
```



More information about the Pkg-openldap-devel mailing list