Forward port 2.6-2.7 upgrade script

Signed-off-by: Ben Shum <bshum@biblio.org>