slapconfig -backupdb causing shares to vanish

Discussion in 'Mac OS X Server, Xserve, and Networking' started by corbywan, Apr 14, 2010.

  1. macrumors regular

    Joined:
    Feb 4, 2008
    Location:
    Forest Grove, OR
    #1
    10.6.3 server, didn't seem to do this pre update.

    You won't notice it until you try to "Connect to server", login, and only your network home folder will show, none of the shares, when they did show earlier in the day.

    Here is what the Directory Services Error Log shows when I notice that I can't do what I could do an hour ago.

    2010-04-14 13:26:32 PDT - T0x00007FFF7033DBE0 - Improper shutdown detected

    When I go to the Configuration Log for the same time frame, it appears that a backup script is running but perhaps doesn't shut down the service properly (hence the error) or can't restart it, or something. I have a crash report in the Console for these events. Here is what that log shows for that event (not the crash report, too long and ugly).

    2010-04-14 13:25:38 -0700 - slapconfig -backupdb
    2010-04-14 13:25:38 -0700 - command: /usr/sbin/sso_util info -r /LDAPv3/127.0.0.1 -p
    2010-04-14 13:25:38 -0700 - 1 Backing up LDAP database
    2010-04-14 13:25:38 -0700 - Stopping LDAP server (slapd)
    2010-04-14 13:25:38 -0700 - command: /usr/bin/db_recover -h /var/db/openldap/openldap-data
    2010-04-14 13:25:38 -0700 - popen: /usr/sbin/slapcat -l /tmp/slapconfig_backup_stage35440zhKUEN/backup.ldif, "r"
    2010-04-14 13:25:41 -0700 - Starting LDAP server (slapd)
    2010-04-14 13:25:42 -0700 - popen: /bin/cp /var/db/openldap/openldap-data/DB_CONFIG /tmp/slapconfig_backup_stage35440zhKUEN/DB_CONFIG, "r"
    2010-04-14 13:25:42 -0700 - popen: /bin/cp -r /etc/openldap /tmp/slapconfig_backup_stage35440zhKUEN/, "r"
    2010-04-14 13:25:42 -0700 - 2 Backing up password server database
    2010-04-14 13:25:42 -0700 - popen: /usr/sbin/mkpassdb -backupdb /tmp/slapconfig_backup_stage35440zhKUEN/passwordserver_backup/ > /dev/null, "r"
    2010-04-14 13:25:42 -0700 - popen: /bin/cp -r /Library/Preferences/com.apple.passwordserver.plist /tmp/slapconfig_backup_stage35440zhKUEN/, "r"
    2010-04-14 13:25:42 -0700 - popen: /usr/sbin/mkpassdb -list > /tmp/slapconfig_backup_stage35440zhKUEN/sasl-plugin-list, "r"
    2010-04-14 13:25:42 -0700 - popen: /bin/hostname > /tmp/slapconfig_backup_stage35440zhKUEN/hostname, "r"
    2010-04-14 13:25:42 -0700 - 3 Backing up Kerberos database
    2010-04-14 13:25:42 -0700 - popen: /usr/sbin/kdb5_util -r EXCHANGECHURCH.COM dump > /tmp/slapconfig_backup_stage35440zhKUEN/kdb5dump.EXCHANGECHURCH.COM.bak, "r"
    2010-04-14 13:25:42 -0700 - popen: /usr/sbin/sso_util info -pr /LDAPv3/127.0.0.1 > /tmp/slapconfig_backup_stage35440zhKUEN/local_odkrb5realm, "r"
    2010-04-14 13:25:55 -0700 - Error: Command failed with exit code 512: /usr/sbin/sso_util info -pr /LDAPv3/127.0.0.1 > /tmp/slapconfig_backup_stage35440zhKUEN/local_odkrb5realm
    2010-04-14 13:25:55 -0700 - popen: /usr/bin/tar czpf /tmp/slapconfig_backup_stage35440zhKUEN/krb5backup.tar.gz /var/db/krb5kdc/kdc.conf /var/db/krb5kdc/kadm5.acl /var/db/krb5kdc/kadm5.keytab /var/db/krb5kdc/.k5.* /Library/Preferences/edu.mit.Kerberos /etc/krb5.keytab , "r"
    2010-04-14 13:25:55 -0700 - popen: /bin/cp /var/db/dslocal/nodes/Default/config/KerberosKDC.plist /tmp/slapconfig_backup_stage35440zhKUEN/KerberosKDC.plist, "r"
    2010-04-14 13:25:55 -0700 - popen: /bin/cp /System/Library/LaunchDaemons/com.apple.PasswordService.plist /tmp/slapconfig_backup_stage35440zhKUEN/LaunchDaemons/, "r"
    2010-04-14 13:25:55 -0700 - 4 Backing up configuration files
    2010-04-14 13:25:55 -0700 - popen: /bin/cp /System/Library/LaunchDaemons/org.openldap.slapd.plist /tmp/slapconfig_backup_stage35440zhKUEN/LaunchDaemons/, "r"
    2010-04-14 13:25:55 -0700 - popen: /bin/cp -r /Library/Preferences/DirectoryService /tmp/slapconfig_backup_stage35440zhKUEN/, "r"
    2010-04-14 13:25:55 -0700 - popen: /bin/cp /Library/Preferences/com.apple.openldap.plist /tmp/slapconfig_backup_stage35440zhKUEN/, "r"
    2010-04-14 13:25:55 -0700 - popen: /bin/cp /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist /tmp/slapconfig_backup_stage35440zhKUEN/, "r"
    2010-04-14 13:25:55 -0700 - popen: /bin/cp /Library/Preferences/com.apple.samba.plist /tmp/slapconfig_backup_stage35440zhKUEN/, "r"
    2010-04-14 13:25:55 -0700 - Error: Command failed with exit code 256: /bin/cp /Library/Preferences/com.apple.samba.plist /tmp/slapconfig_backup_stage35440zhKUEN/
    2010-04-14 13:25:55 -0700 - popen: /usr/bin/sw_vers > /tmp/slapconfig_backup_stage35440zhKUEN/version.txt, "r"
    2010-04-14 13:25:55 -0700 - popen: /bin/cp -r /var/db/dslocal /tmp/slapconfig_backup_stage35440zhKUEN/, "r"
    2010-04-14 13:25:55 -0700 - 5 Backing up local directory database
    2010-04-14 13:25:55 -0700 - popen: /usr/bin/tar czpf /tmp/slapconfig_backup_stage35440zhKUEN/shadowbackup.tar.gz /var/db/shadow, "r"
    2010-04-14 13:25:56 -0700 - popen: /usr/bin/gnutar cpf /tmp/slapconfig_backup_stage35440zhKUEN/sambabackup.tar /var/db/samba /etc/smb.conf, "r"
    2010-04-14 13:25:56 -0700 - command: /usr/bin/gnutar --delete -f /tmp/slapconfig_backup_stage35440zhKUEN/sambabackup.tar var/db/samba/secrets.tdb
    2010-04-14 13:25:56 -0700 - command: /usr/bin/gzip -f4 /tmp/slapconfig_backup_stage35440zhKUEN/sambabackup.tar
    2010-04-14 13:25:56 -0700 - Backed Up Keychain
    2010-04-14 13:25:56 -0700 - 6 Creating archive
    2010-04-14 13:25:56 -0700 - command: /usr/bin/hdiutil create -ov -plist -puppetstrings -layout UNIVERSAL CD -fs HFS+ -volname ldap_bk -srcfolder /tmp/slapconfig_backup_stage35440zhKUEN -format SPARSE /private/tmp/ServerBackup_OpenDirectoryMaster
    2010-04-14 13:26:03 -0700 - Removed directory at path /tmp/slapconfig_backup_stage35440zhKUEN.
    2010-04-14 13:26:03 -0700 - Removed file at path /var/run/slapconfig.lock.
    2010-04-14 13:26:11 -0700 - slapconfig -backupdb
    2010-04-14 13:26:11 -0700 - command: /usr/sbin/sso_util info -r /LDAPv3/127.0.0.1 -p
    2010-04-14 13:26:11 -0700 - 1 Backing up LDAP database
    2010-04-14 13:26:11 -0700 - Stopping LDAP server (slapd)
    2010-04-14 13:26:11 -0700 - command: /usr/bin/db_recover -h /var/db/openldap/openldap-data
    2010-04-14 13:26:12 -0700 - popen: /usr/sbin/slapcat -l /tmp/slapconfig_backup_stage356181QINwc/backup.ldif, "r"
    2010-04-14 13:26:14 -0700 - Starting LDAP server (slapd)
    2010-04-14 13:26:16 -0700 - popen: /bin/cp /var/db/openldap/openldap-data/DB_CONFIG /tmp/slapconfig_backup_stage356181QINwc/DB_CONFIG, "r"
    2010-04-14 13:26:16 -0700 - popen: /bin/cp -r /etc/openldap /tmp/slapconfig_backup_stage356181QINwc/, "r"
    2010-04-14 13:26:17 -0700 - 2 Backing up password server database
    2010-04-14 13:26:17 -0700 - popen: /usr/sbin/mkpassdb -backupdb /tmp/slapconfig_backup_stage356181QINwc/passwordserver_backup/ > /dev/null, "r"
    2010-04-14 13:26:17 -0700 - popen: /bin/cp -r /Library/Preferences/com.apple.passwordserver.plist /tmp/slapconfig_backup_stage356181QINwc/, "r"
    2010-04-14 13:26:17 -0700 - popen: /usr/sbin/mkpassdb -list > /tmp/slapconfig_backup_stage356181QINwc/sasl-plugin-list, "r"
    2010-04-14 13:26:17 -0700 - popen: /bin/hostname > /tmp/slapconfig_backup_stage356181QINwc/hostname, "r"
    2010-04-14 13:26:17 -0700 - 3 Backing up Kerberos database
    2010-04-14 13:26:17 -0700 - popen: /usr/sbin/kdb5_util -r EXCHANGECHURCH.COM dump > /tmp/slapconfig_backup_stage356181QINwc/kdb5dump.EXCHANGECHURCH.COM.bak, "r"
    2010-04-14 13:26:17 -0700 - popen: /usr/sbin/sso_util info -pr /LDAPv3/127.0.0.1 > /tmp/slapconfig_backup_stage356181QINwc/local_odkrb5realm, "r"
    2010-04-14 13:26:28 -0700 - Error: Command failed with exit code 512: /usr/sbin/sso_util info -pr /LDAPv3/127.0.0.1 > /tmp/slapconfig_backup_stage356181QINwc/local_odkrb5realm
    2010-04-14 13:26:28 -0700 - popen: /usr/bin/tar czpf /tmp/slapconfig_backup_stage356181QINwc/krb5backup.tar.gz /var/db/krb5kdc/kdc.conf /var/db/krb5kdc/kadm5.acl /var/db/krb5kdc/kadm5.keytab /var/db/krb5kdc/.k5.* /Library/Preferences/edu.mit.Kerberos /etc/krb5.keytab , "r"
    2010-04-14 13:26:28 -0700 - popen: /bin/cp /var/db/dslocal/nodes/Default/config/KerberosKDC.plist /tmp/slapconfig_backup_stage356181QINwc/KerberosKDC.plist, "r"
    2010-04-14 13:26:28 -0700 - popen: /bin/cp /System/Library/LaunchDaemons/com.apple.PasswordService.plist /tmp/slapconfig_backup_stage356181QINwc/LaunchDaemons/, "r"
    2010-04-14 13:26:28 -0700 - 4 Backing up configuration files
    2010-04-14 13:26:28 -0700 - popen: /bin/cp /System/Library/LaunchDaemons/org.openldap.slapd.plist /tmp/slapconfig_backup_stage356181QINwc/LaunchDaemons/, "r"
    2010-04-14 13:26:28 -0700 - popen: /bin/cp -r /Library/Preferences/DirectoryService /tmp/slapconfig_backup_stage356181QINwc/, "r"
    2010-04-14 13:26:28 -0700 - popen: /bin/cp /Library/Preferences/com.apple.openldap.plist /tmp/slapconfig_backup_stage356181QINwc/, "r"
    2010-04-14 13:26:28 -0700 - popen: /bin/cp /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist /tmp/slapconfig_backup_stage356181QINwc/, "r"
    2010-04-14 13:26:28 -0700 - popen: /bin/cp /Library/Preferences/com.apple.samba.plist /tmp/slapconfig_backup_stage356181QINwc/, "r"
    2010-04-14 13:26:28 -0700 - Error: Command failed with exit code 256: /bin/cp /Library/Preferences/com.apple.samba.plist /tmp/slapconfig_backup_stage356181QINwc/
    2010-04-14 13:26:28 -0700 - popen: /usr/bin/sw_vers > /tmp/slapconfig_backup_stage356181QINwc/version.txt, "r"
    2010-04-14 13:26:28 -0700 - popen: /bin/cp -r /var/db/dslocal /tmp/slapconfig_backup_stage356181QINwc/, "r"
    2010-04-14 13:26:28 -0700 - 5 Backing up local directory database
    2010-04-14 13:26:28 -0700 - popen: /usr/bin/tar czpf /tmp/slapconfig_backup_stage356181QINwc/shadowbackup.tar.gz /var/db/shadow, "r"
    2010-04-14 13:26:28 -0700 - popen: /usr/bin/gnutar cpf /tmp/slapconfig_backup_stage356181QINwc/sambabackup.tar /var/db/samba /etc/smb.conf, "r"
    2010-04-14 13:26:28 -0700 - command: /usr/bin/gnutar --delete -f /tmp/slapconfig_backup_stage356181QINwc/sambabackup.tar var/db/samba/secrets.tdb
    2010-04-14 13:26:28 -0700 - command: /usr/bin/gzip -f4 /tmp/slapconfig_backup_stage356181QINwc/sambabackup.tar
    2010-04-14 13:26:28 -0700 - Backed Up Keychain
    2010-04-14 13:26:28 -0700 - 6 Creating archive
    2010-04-14 13:26:28 -0700 - command: /usr/bin/hdiutil create -ov -plist -puppetstrings -layout UNIVERSAL CD -fs HFS+ -volname ldap_bk -srcfolder /tmp/slapconfig_backup_stage356181QINwc -format SPARSE /.ServerBackups/openDirectory/ServerBackup_OpenDirectoryMaster
    2010-04-14 13:26:40 -0700 - Removed directory at path /tmp/slapconfig_backup_stage356181QINwc.
    2010-04-14 13:26:40 -0700 - Removed file at path /var/run/slapconfig.lock.

    It looks like slapconfig -backupdb runs hourly but something goes wrong occasionally. Anyone seen this before? Regarding the 256 error, for some reason I don't have a com.apple.samba.plist file in the path the script is looking for. That also seems weird because I have SMB running.
     
  2. thread starter macrumors regular

    Joined:
    Feb 4, 2008
    Location:
    Forest Grove, OR
    #2
    And, this is a first, but after the next run of the script, it seems to have fixed itself because I can now login and see all my shares again, without a reboot. Stranger and stranger...
     
  3. macrumors newbie

    Joined:
    Jul 3, 2003
    #3
    Yup. I'm seeing the same problem. I've started a discussion here:

    http://discussions.apple.com/thread.jspa?messageID=11539227

    Interestingly, our times seem to be similar. Mine happened today at 13:13, yours at 13:25.

    Do you know what is triggering this backup? Do you know where the resulting disc image is stored?
     

Share This Page