Bug#306435: slapd: Hidden file in /var/lib/ldap caused upgrade to fail (Directory not empty)
Steve Langasek wrote: severity 306435 important thanks A hidden file (probably admin created) in /var/lib/ldap broke the slapd upgrade when the backed up database was restored. It appears that all VISIBLE files were removed from this directory as part of the upgrade, this procedure should be extended to ALL files. What do you mean by "hidden" file? Do you mean a dotfile (filename begins with ".")? Yes. Since there is obviously a workaround for this problem, and since the maintainer scripts handle upgrades for normal use cases of /var/lib/ldap just fine (it is not normal to create extra files in /var/lib/ldap, a directory owned by the slapd server), I don't believe this bug should be RC. On further inspection it appears that the temporary dotfile was an artifact of a previous slapd upgrade or related procedure. This machine was never Woody so it may not affect upgraders however it has been testing for a long time so who knows? Cheers -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#306435: Hidden file info: .tmp.ldif.swp
Hidden file was called: .tmp.ldif.swp -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#306435: Hidden file info: .tmp.ldif.swp
Torsten Landschoff wrote: Steve, do you have any idea how to remove hidden files as well? Currently we do mv /var/lib/ldap/* /var/backups/... Not sure if this is the easiest way but find /var/lib/ldap/* -mindepth 1 -exec mv \{\} /var/backups/ \; Seems to work This page seems to suggest that just using mv it will be pretty awful https://www.redhat.com/archives/fedora-list/2004-July/msg05272.html Cheers Adam Clarke Strategic Data Pty Ltd www.strategicdata.com.au [EMAIL PROTECTED] [p] +61-3-9348-2013 [f] +61-3-9348-2015 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#306435: Minor update to script
This prevents errors if there happens to be subdirectories find /var/lib/ldap/* -mindepth 1 -maxdepth 1 -exec mv \{\} /var/backups/ \; Notice the maxdepth (in addition to mindepth). Otherwise things that have already been moved are referenced causing find to barf (if there are subdirs). I have attached a test script - it will create a directory test-move and some test dirs/files therein. It then uses the test data to see if the above works. Cheers -- Adam Clarke Strategic Data Pty Ltd www.strategicdata.com.au [EMAIL PROTECTED] [p] +61-3-9348-2013 [f] +61-3-9348-2015 echo "Make some files to test on" echo " d - has test files" echo " d.backup - is empty" mkdir test-move cd test-move mkdir d mkdir d.backup mkdir d/d-recursive mkdir d/.d-recursive touch d/nothidden touch d/.hidden touch d/..hidden cp d/{.,}*hidden d/d-recursive/ cp d/{.,}*hidden d/.d-recursive/ echo "Look in d - should have files" ls -alR d echo "Look in d.backup - should be empty" ls -alR d.backup echo "Now move stuff" find d -mindepth 1 -maxdepth 1 -exec mv \{\} d.backup \; echo "Now d is empty" ls -alR d echo "Now d.backup has files" ls -alR d.backup