So I found this error when trying to execute the following command;

/opt/couchbase/bin/couchbase-cli rebalance -c 192.168.1.1 --server-add=192.168.1.2:8091 -uAdministrator -psomepassword

ERROR: unable to server-add 192.168.1.2:8091 (400) Bad Request
[u'Prepare join failed. Authentication failed. Verify username and password. Got HTTP status 401 from REST call post to http://192.168.1.1:8091/engageCluster2. Body was: []']

This was working fine with previous versions, so I found the "BUG":

http://www.couchbase.com/issues/browse/MB-7186

So from now on we need to add --server-add-username=  --server-add-password= , they are usual the same as the cluster credentials.

Working command:

/opt/couchbase/bin/couchbase-cli rebalance -c 192.168.1.1 --server-add=192.168.1.2:8091 -uAdministrator -psomepassword --server-add-username=Administrator  --server-add-password=somepassword

SUCCESS: server-add 192.168.1.2:8091
INFO: rebalancing .
SUCCESS: rebalanced cluster

I hope this will help someone!

Install Multicore

First install tomcat6: aptitude install tomcat6

Get the last stable release of solr @ http://apache.ziply.com/lucene/solr/ . As of 16/Aug/2012 is 3.6.1 :

mkdir -p ~/tmp/solr cd ~/tmp/solr/ wget http://apach.ziply.com/lucene/solr/3.6.1/apache-solr-3.6.1.tgz tar xzvf apache-solr-3.6.0.tgz

Now choose where the files and cores of solr goes, i.e : /srv/solr

mkdir -p /srv/solr

Now copy the solr web application and example core files

cp apache-solr-3.6.1/dist/apache-solr-3.6.1.war /srv/solr/solr.war cp -R apache-solr-3.6.1/example/multicore/* /srv/solr/ chown -R tomcat6 /srv/solr/

Point Catalina to the solr

echo -e '<Context docBase=”/var/solr/solr.war” debug=“0” privileged=“true” allowLinking=“true” crossContext=“true”>\n<Environment name=“solr/home” type=“java.lang.String” value=”/var/solr” override=“true” />\n</Context>' | tee -a /etc/tomcat6/Catalina/localhost/solr.xml echo 'TOMCAT6_SECURITY=no' | tee -a /etc/default/tomcat6

Edit the init script (/etc/init.d/tomcat6) to set solr.home, pointing it at /srv/solr. Do this where the VARs are declared, the VAR is:

JAVA_OPTS=“$JAVA_OPTS -Dsolr.home=/srv/solr”

Restart tomcat

/etc/init.d/tomcat6 restart

Now you can access it via web on localhost:8080

ssh -L 8080:localhost:8080 user@host

Open your browser on localhost:8080/solr and there you go! :)

1- Restore the Mailbox Store (.edb file) from the backup and also the log files!

2- Go to the folder where you put the .edb file . We need now to check if the database was clean shutdown or dirty shutdown.

[PS] S:\Data>eseutil.exe /mh SG1.edb

 

This database is now in Clean Shutdown, but is was in Dirty Shutdown condition.

Next lets see if our log files are ok!

[PS] S:\Data>eseutil.exe /mh S:\Recovery\RDB1\E02

(Being E02 my prefix for the logs and my log are on S:\Recovery\RDB1\)

 

This is important since our log files must be ok! This is Full backup, plus the incremental!

3 - Now we try to recover the database with the log files.

In my case:

[PS] S:\Data>eseutil.exe /r E02 /l S:\Data\RDB1\ /a /d S:\Data\SG1.edb

If it was successfully check again the stat of the DB with eseutil.exe /mh

If still says dirty go to the folder where your edb file is (mine S:\Data) and run following command:

[PS] S:\Data>eseutil.exe /p SG1.edb

WARNING: This will take a long time and will lock the transaction log file! Be advised! My edb file with 335GB took about 13 hours to complete, but in the end it was in clean shutdown!!! :) URRA!

4- Now we have a database cleanly shutdown so we will mount it.

[PS] S:\Data>New-MailboxDatabase -Recovery -Name "RDB" -Server EXCH-MB1 -EdbFilePath S:\Data\SG1.edb -LogFolderPath S:\Data\E02

Open Exhange Management Console and check if the RDB is mounted and green! :)

5- Finally we will recover the mailbox we want. Create a normal Mailbox, name it whatever you want, i call it Recover, give to you full access on it! Add this to your outlook account!

And now we will restore the mailbox we want to a FOLDER inside the mailbox Recover we add previously created... You could restore to you own mailbox since it will create a folder and put all the folder of the mailbox to be recovered inside. But i prefer to separate things!

This command is tricky in the switches, the IDENTITY is the mailbox where you will put the recovered mailbox and RecoveryMailbox being the one to be restored!

[PS] S:\Data>Restore-Mailbox -Identity "Recover" -RecoveryMailbox "JohnDoe" -RecoveryDatabase RDB -TargetFolder "JohnDoeRecover" -Confirm

Wait until it finishes!

Now you can go check your Recover mailbox and there will be a folder name JohnDoeRecover with all the email and folders inside!

Hope this helps, any question put in the comments!

Cheers

pLASTIK

TAGs