8

I'm almost afraid to ask this question here because it seems like it should be readily available via google or on ravendb.net. However, I've been having a tough time finding out the proper way to upgrade my RavenDB to a new version. I'm currently running version 573 and want to upgrade to 616, simply for the ability to promote an index in Raven Studio.

What is the proper way to upgrade? Do I backup my DB, delete my entire Raven folder on the hard disk, then copy the new 616 version to that same folder area? Then restore the DB?

EDIT:

How I Upgraded RavenDB v573 to v960 (27-Nov-2012):

Note: Changing the MaxPageSize (step 7.b) is not recommended.

  1. Run automated tests against local 960 to verify nothing breaks.
  2. Back up 573 RavenDB
  3. Install/unzip 960 to production server
  4. Copy data folder from 573 to 960
  5. Give user PrestoDatabaseUser full access to the data folder
  6. Uninstall existing RavenDB service:
    a. sc delete RavenDB
    b. Rename old 573 folder to RavenDB-Build-573_deprecate
  7. Set Raven.Server.exe.config (bring over any altered settings from the original config):
    a. <add key="Raven/AnonymousAccess" value="Get"/>
    b. <add key="Raven/MaxPageSize" value="2147483647"/>
    c. <add key="Raven/Authorization/Windows/RequiredUsers" value="domain\UserName"/>
  8. Install as a service:
    a. C:\Software\RavenDb\RavenDB-Build-960\Server>Raven.Server.exe /install
  9. Change RavenDB backup batch file to point to new 960 folder structure
  10. If the services/apps aren't responding to the new RavenDB, restart them.
Bob Horn
  • 33,387
  • 34
  • 113
  • 219

2 Answers2

9

BobHorn,

The way I do it, on our production sites :-) 1) Stop the IIS site. 2) Replace the binaries 3) Start the IIS site.

If it is a big change, I also do a backup. But that is pretty much it.

Ayende Rahien
  • 22,925
  • 1
  • 36
  • 41
2

In the past, I have installed RavenDB newer version as a IIS website completely separate from the old one. Then moved the data folder from old to new location. Then slowly phase the old one out (of course depending on your situation, you would change the appropriate IIS settings for the website as you keep phasing out old one)

ZVenue
  • 4,967
  • 16
  • 61
  • 92
  • Thanks. I'm not using IIS with Raven. I'm using the .NET API. I have the ability to take the DB completely offline for a short time, so I don't need to phase one out. Based on what you said, it looks like I can just do what I said in my original question: backup DB, delete old Raven installation, install new Raven, restore backup. – Bob Horn Feb 23 '12 at 14:52
  • I wish there is a better way to upgrade then that takes care of all of this in the background... may be there is. One of the experts Daniel or Ayende might be able to help you. – ZVenue Feb 23 '12 at 15:04
  • I actually don't see this as a bad solution; I just want to know if it's the right way to do it. – Bob Horn Feb 23 '12 at 15:24
  • @BobHorn if you find a solution (even outside of stack) can you post it here for reference? I would like to know the best process as well. – scarpacci Feb 23 '12 at 19:20
  • @scarpacci Will do. If you like the question, you could always upvote it. :) – Bob Horn Feb 23 '12 at 19:39