----------------------------------------------------------------------------


Upgrading

----------------------------------------------------------------------------
----------------------------------------------------------------------------

Table of Contents

1. Automatic Store Upgrade
2. Explicit Store Upgrade


    Important

    This section describes upgrading a single Neo4j instance. To upgrade a
    Neo4j HA cluster (Neo4j Enterprise) a very specific procedure must be
    followed. Please see Upgrade of a Neo4j HA Cluster at
    <http://neo4j.com/docs/2.3.2/ha-upgrade-guide.html> .

Each Neo4j version supports upgrading from a limited number of previous 
versions. These upgrades are either automatic, or require explicit 
configuration to allow them. Upgrades between patch releases within the same 
minor version are automatic. Upgrading to the latest patch release is 
recommended before upgrading to new major or minor versions.

A database created by an older version of Neo4j will be upgraded during startup 
when opened by the target version of Neo4j.

The following Neo4j versions, where x stands for the latest patch release, can 
be upgraded to Neo4j 2.3.2:

1.9.x --> 2.3.2
    Explicit configuration is required

2.0.x --> 2.3.2
    Explicit configuration is required

2.1.x --> 2.3.2
    Explicit configuration is required

2.2.x --> 2.3.2
    Explicit configuration is required



    Note

    Downgrade is only supported between Neo4j versions that allow for automatic
    store upgrades. This typically means only within patch releases of the same
    Neo4j version.

----------------------------------------------------------------------------


1. Automatic Store Upgrade

----------------------------------------------------------------------------

To perform an automatic store upgrade:

   1. Cleanly shut down the older version of Neo4j, if it is running.
   2. Install Neo4j 2.3.2, and set it up to use the same database store
      directory (typically data/graph.db).
   3. Make a copy of the database.


          Important

          It is strongly advised to make a copy of the database store directory
          at this time, to use as a backup in case rollback/downgrade is
          required. This is not necessary if a backup has been made using the
          online backup tool (see
          <http://neo4j.com/docs/2.3.2/operations-backup.html> ), available
          with Neo4j Enterprise.

   4. Start up Neo4j.
   5. Any database store upgrade required will occur during startup.
----------------------------------------------------------------------------


2. Explicit Store Upgrade

----------------------------------------------------------------------------

To perform an explicit store upgrade:

   1. Install Neo4j 2.3.2, and set it up to use the same database store
      directory (typically data/graph.db).
   2. Cleanly shut down the older version of Neo4j, if it is running.
   3. Set the Neo4j configuration parameter allow_store_upgrade=true in your 
      conf/neo4j.properties file. Neo4j will fail to start without this
      configuration set.
   4. Start up Neo4j.
   5. The database store upgrade will occur during startup.
   6. The allow_store_upgrade configuration parameter should be removed, set to 
      false or commented out.
   7. Information about the upgrade and a progress indicator are logged into
      the messages.log file, inside the database store directory.


    Disk space requirements

    An explicit upgrade will require substantial free disk space, as it must
    make an entire copy of the database store. The upgraded store version may
    also require larger store files overall. It is suggested to have available
    free disk space equivalent to at least 1.5 times the size of the existing
    store.


    Cypher compatibility

    The Cypher language is rapidly evolving, and may change between Neo4j
    versions. However, Neo4j supports compatibility directives for Cypher, that
    allow explicitly selecting a language version. This is possible to do for
    individual statements, or globally, as described in the Cypher
    Compatibility section at
    <http://neo4j.com/docs/2.3.2/cypher-compatibility.html> .