Upgrading from March 2016 Build


New member, I’ve recently started working at a company where they have not updated the phabricator very often and have been given the task of doing so. Is there any notable documentation, apart from the general one you provide OR anything I should now before following the upgrade progress. Ideally, I’d like to upgrade in stages but don’t think this is possible?

It’s totally possible to upgrade in stages if that’s what you want. The Changelog entries include the revision for each repository, so if you git pull in each (libphutil, arcanist, and phabricator) and then git checkout the right revisions, you’ll have your whole setup at a consistent point in time. Then you can bin/storage upgrade to get your schema up to date to that point in time.

The update process has always been smooth and painless in my (extensive) experience running Phabricator, so I don’t expect you’ll have much difficulty.

1 Like

That sounds like a plan, thanks @rfreebern for the help!

Is there any way to tell which/how many of the incremental updates need to be applied?

I also have a March 2016 build, but when I tried to upgrade to the latest there was an error with the storage upgrade command. The main error was that it could not update a Db that did not exist, so I’m assuming some past upgrade added that Db, and the latest update was expecting a minimum version from which to upgrade.

the bin/storage upgrade command runs all pending patches by date, so if one patch adds a table and another removes it, they will work.
The cases where this might fail are when a patch is written in PHP and is using code that doesn’t exist any more, because it was removed some time after the patch was created.
We sometimes fix and update those patches, but not always (And we often don’t know they break).

As a rule of thumb, if your increments are nor more than 4-5 months, you should be fine (remember to sync libphutil and arcanist too).

The recommendation is to update your install at least monthly.

1 Like

Out of interest is it possible to go back and rerun one of the upgrade patches?

is it possible to go back and rerun one of the upgrade patches?

Most migrations don’t destroy data (some do), but there’s no generic way to undo a migration. In some cases, you can generate the inverse-patch and apply it manually. You’ll also want to update the metadata table to remove the patch from the “applied” list.