NAME

OpenResty::Spec::Upgrading - Upgrading to new versions of OpenResty server

SYNOPSIS

    # upgrade metamodel
    $ bin/openresty upgrade foo
    $ bin/openresty upgrade

DESCRIPTION

New versions of OpenResty server often contain modifications to the metamodel which is the data structure used by the server itself. So in order to run a newer version of OpenResty atop the database used to work with an older one, it's often required to upgrade the metamodel first. Basically it's as easy as

    $ bin/openresty upgrade

This command will upgrade both the global metamodel (in the _global schema) as well as the local metamodel in all the OpenResty accounts' schemas. (See OpenResty::Spec::MetaModel for more details about the MetaModel.)

It's also possible to upgrade just a specified OpenResty account without upgrading either the global metamodel or other accounts. Just give the account name to the "upgrade" command:

    $ bin/openresty upgrade foo

where foo is the account which we want to upgrade exclusively.

Note that it's highly recommended to use only the CPAN release for upgrading. The SVN head might contain some half-done MetaModel changes which may corrupt you metamodel in the database later.

If you're a developer, however, the use of the SVN head is certainly encouraged ;)

In case the upgrading failed (it should not happen often), one might have to fix the failure himself. A metamodel recovering tool is in our TODO list though.

AUTHOR

Agent Zhang (agentzh) <agentzh@yahoo.cn>

SEE ALSO

openresty, OpenResty::Spec::MetaModel, OpenResty.