Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 40

Thread: Error Valid backup file not found upgrading from 5.0.18 to 6

  1. #11
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Goal is to create an /opt/zimbra/data/ldap/ldap.bak

    Quote Originally Posted by script
    sub migrateLdap($) {
    my ($migrateVersion) = @_;
    if (main::isInstalled ("zimbra-ldap")) {
    if($main::configStatus{"LdapMigrated$migrateVersion"} ne "CONFIGURED") {
    if (-f "/opt/zimbra/data/ldap/ldap.bak") {
    my $infile = "/opt/zimbra/data/ldap/ldap.bak";
    my $outfile = "/opt/zimbra/data/ldap/ldap.60";
    if ( -s $infile ) {
    open(IN,"<$infile");
    open(OUT,">$outfile");
    while() {
    if ($_ =~ /^zimbraPrefStandardClientAccessilbityMode:/) {next;}
    if ($_ =~ /^objectClass: zimbraHsmGlobalConfig/) {next;}
    if ($_ =~ /^objectClass: zimbraHsmServer/) {next;}
    print OUT $_;
    }
    } else {
    main:rogress("Valid backup file not found, exiting.\n");
    return 1;
    }
    A way to generate a LDIF output is a slapcat:
    Code:
    openldap/sbin/slapcat -f /opt/zimbra/conf/slapd.conf -l /tmp/ldap.ldif
    We even roll it into a easier utility:
    Quote Originally Posted by zmslapcat
    ${zimbra_home}/openldap/sbin/slapcat -F ${zimbra_home}/data/ldap/config -b "" -l $DEST/ldap.bak.${D}
    cp -f ${DEST}/ldap.bak.${D} ${DEST}/ldap.bak
    So run this:
    Code:
    su - zimbra
    cd /opt/zimbra/libexec
    ./zmslapcat /opt/zimbra/data/ldap
    Should produce a ldap.bak & ldap.bak.date in /opt/zimbra/data/ldap.

    ~~~
    You don't need to restore but here's how you'd use slapadd:
    Code:
    /opt/zimbra/openldap/sbin/slapadd -f /opt/zimbra/conf/slapd.conf -l /tmp/ldap.ldif

    That command would only work in 5.x since in 6.x OpenLDAP now allows for some on-the-fly configuration changes with zmlocalconfig via a cn=config backend instead of slapd.conf text files for preservation across upgrades.
    So, if something went wrong it's better to run:
    Code:
    /opt/zimbra/openldap/sbin/slapadd -q -b "" -F /opt/zimbra/data/ldap/config/ -cv -l ldap.bak
    Edit: You may have a good ldap.bak.timestamp that's not zero length (caused by running the installer multiple times) to use first rather than taking a new one.

    Quote Originally Posted by mmorse View Post
    Bug 43591 – ldap.bak issues on GNR upgrades

    Quanah also pointed out that depending on when you create this ldap.bak (if your not using one that was created earlier like ldap.bak.timestamp) have to be using the 5.0 slapcat/sleepycatlibs for BDB differences with 6.0 to get a valid backup.
    Last edited by mmorse; 12-17-2009 at 12:29 PM.

  2. #12
    Join Date
    Sep 2009
    Posts
    3
    Rep Power
    6

    Default

    many files ldap.bak and ldap.bak.{DATE} in /opt/zimbra/data/ldap, but his size 0...

  3. #13
    Join Date
    Jan 2007
    Location
    Germany
    Posts
    42
    Rep Power
    8

    Default

    Quote Originally Posted by vitall View Post
    many files ldap.bak and ldap.bak.{DATE} in /opt/zimbra/data/ldap, but his size 0...
    Hey

    The same here...

    -rw-r----- 1 zimbra zimbra 69634 Sep 4 11:53 ldap.bak.20090904115346
    drwxr-xr-x 4 zimbra zimbra 4096 Sep 4 11:54 hdb
    drwxr-xr-x 3 zimbra zimbra 4096 Sep 4 11:56 config
    -rw-r----- 1 zimbra zimbra 0 Sep 4 12:27 ldap.bak.20090904122749
    -rw-r----- 1 zimbra zimbra 0 Sep 4 12:47 ldap.bak.20090904124759
    -rw-r----- 1 zimbra zimbra 0 Sep 4 12:59 ldap.bak.20090904125911
    -rw-r----- 1 zimbra zimbra 0 Sep 4 13:09 ldap.bak.20090904130907
    -rw-r----- 1 zimbra zimbra 0 Sep 4 13:19 ldap.bak.20090904131958
    -rw-r----- 1 zimbra zimbra 0 Sep 4 14:22 ldap.bak.20090904142254
    -rw-r----- 1 zimbra zimbra 0 Sep 4 15:07 ldap.bak.20090904150745
    -rw-r----- 1 zimbra zimbra 0 Sep 4 17:17 ldap.bak.20090904171754
    -rw-r----- 1 zimbra zimbra 0 Sep 4 17:19 ldap.bak.20090904171934
    -rw-r----- 1 zimbra zimbra 0 Sep 4 17:19 ldap.bak
    Same here - only zero lenght files created as Backup - error is still there

  4. #14
    Join Date
    Jan 2007
    Location
    Germany
    Posts
    42
    Rep Power
    8

    Default

    Hmm - has anyone an idea?

  5. #15
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    Have you tried the commands that both mmorse and myself have posted ?

  6. #16
    Join Date
    Jan 2007
    Location
    Germany
    Posts
    42
    Rep Power
    8

    Default

    yes, i have. It creates 2 files named ldap.bak and ldap.bak.$TIMESTAMP in
    /opt/zimbra/data/ldap/ - both Files have the size 0.

    After that, i started install.sh - and the same error appears. Could not find any valid Backup File

  7. #17
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    Has the install script actually updated the core ZCS files ?

    I am wondering, as mmorse has said, that due to the changes to the schema etc the command that is being executed in the ZCS6 zmslapcat is failing for some reason when query a V5 LDAP database.

  8. #18
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    Okay, try running this
    Code:
    su - zimbra
    /opt/zimbra/openldap/sbin/slapcat -F /opt/zimbra/data/ldap/config -b "" -l /opt/zimbra/data/ldap/ldap.bak
    Does it just return to the command prompt ? Any errors produced ? Try removing the ldap.bak files from /opt/zimbra/data/ldap first (I would just create a backup directory under there and move the files into it).

  9. #19
    Join Date
    Jan 2007
    Location
    Germany
    Posts
    42
    Rep Power
    8

    Default

    Quote Originally Posted by uxbod View Post
    Has the install script actually updated the core ZCS files ?
    Of course - if i run install.sh with the switch "-s" the script ended with no errors.

    Software Installation complete!

    Operations logged to /tmp/install.log.13103

    Run /opt/zimbra/libexec/zmsetup.pl to configure the system
    So - after that, i run zmsetup.pl

    root@server:/# /opt/zimbra/libexec/zmsetup.pl
    Operations logged to /tmp/zmsetup.09052009-105213.log
    Upgrading from 5.0.18_GA_3011 to 6.0.0_GA_1802
    Stopping zimbra services...done.
    Verifying /opt/zimbra/conf/my.cnf
    Starting mysql...done.
    This appears to be 5.0.18_GA
    Stopping mysql...done.
    Valid backup file not found, exiting.
    UPGRADE FAILED - exiting.
    dpkg --list says, that version 6 is installed

    ii zimbra-apache 6.0.0_GA_1802.UBUNTU6 Best email money can buy
    ii zimbra-core 6.0.0_GA_1802.UBUNTU6 Best email money can buy
    ii zimbra-ldap 6.0.0_GA_1802.UBUNTU6 Best email money can buy
    ii zimbra-logger 6.0.0_GA_1802.UBUNTU6 Best email money can buy
    ii zimbra-memcached 6.0.0_GA_1802.UBUNTU6 Best email money can buy
    ii zimbra-mta 6.0.0_GA_1802.UBUNTU6 Best email money can buy
    ii zimbra-proxy 6.0.0_GA_1802.UBUNTU6 Best email money can buy
    ii zimbra-snmp 6.0.0_GA_1802.UBUNTU6 Best email money can buy
    ii zimbra-spell 6.0.0_GA_1802.UBUNTU6 Best email money can buy
    ii zimbra-store 6.0.0_GA_1802.UBUNTU6 Best email money can buy
    ...also a zmcontrol -v

    zimbra@server:~$ zmcontrol -v


    Release 6.0.0_GA_1802.UBUNTU6 UBUNTU6 FOSS edition.

  10. #20
    Join Date
    Jan 2007
    Location
    Germany
    Posts
    42
    Rep Power
    8

    Default

    Quote Originally Posted by uxbod View Post
    Okay, try running this
    Code:
    su - zimbra
    /opt/zimbra/openldap/sbin/slapcat -F /opt/zimbra/data/ldap/config -b "" -l /opt/zimbra/data/ldap/ldap.bak
    Does it just return to the command prompt ? Any errors produced ? Try removing the ldap.bak files from /opt/zimbra/data/ldap first (I would just create a backup directory under there and move the files into it).

    ok, it creates a file name ldap.bak with also zero lenght. installation ended after that with the same error

    zimbra@server:~/data/ldap$ rm ldap.bak*
    rm: remove regular empty file `ldap.bak'? y
    zimbra@server:~/data/ldap$ /opt/zimbra/openldap/sbin/slapcat -F /opt/zimbra/data/ldap/config -b "" -l /opt/zimbra/data/ldap/ldap.bak
    zimbra@server:~/data/ldap$ ls -ltr
    total 8
    drwxr-xr-x 4 zimbra zimbra 4096 Sep 4 11:54 hdb
    drwxr-xr-x 3 zimbra zimbra 4096 Sep 4 11:56 config
    -rw-r----- 1 zimbra zimbra 0 Sep 5 11:00 ldap.bak
    zimbra@server:~/data/ldap$

Similar Threads

  1. bayes db..
    By osiris in forum Administrators
    Replies: 9
    Last Post: 06-15-2011, 12:14 PM
  2. Replies: 20
    Last Post: 03-18-2008, 06:37 AM
  3. i made a mess 4.5.6 -> 4.5.10 to a future 5.0 FOSS
    By innercy in forum Installation
    Replies: 7
    Last Post: 01-09-2008, 07:05 PM
  4. Zimbra Install Problem - getDirectContext
    By bsimzer in forum Installation
    Replies: 27
    Last Post: 07-19-2007, 11:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •