Everything looks OK except get rid of step 4--that's creating a DB with the
new schema. Just create an empty database and then use your database dump
to populate it. rb-site upgrade will convert the schema to the new format.

-David

On Wed, Mar 14, 2018 at 3:07 PM Chris Lang <crlan...@gmail.com> wrote:

> Alright here are my current steps for upgrading.
>
> 1. Install ReviewBoard 3.0.3 on new machine.
>
> easy_install ReviewBoard
>
> 2. Copy over my site directory from my old machine into the correct
> location (/var/www/reviews)
>
> On old machine:
>
> scp reviews.tar.gz user@newmachine:/var/www/
>
> On new machine:
> tar xvzf reviews.tar.gz
>
> 3. Create a reviewboard database
>
> Open mysql:
>
> mysql -u root -p
>
> Then in mysql:
>
> create database reviewboard character setutf8;
> grant all priveleges on reviewboard.* to 'reviewboard'@'localhost';
>
> 4. Initialize the database
>
> rb-site manage /var/www/reviews syncdb -- --no-initial-data
>
> 5. Mysql dump of reviewboard database on old machine and compress it.
>
> mysqldump -u root -p reviewboard > reviewboard.sql
> gzip reviewboard.sql
>
> 6. Send sql dump to new machine
>
> scp reviewboard.sql.gz user@newmachine:/root/reviewboard.sql.gz
>
> 7. Extract sql file on new machine:
>
> gunzip reviewboard.sql.gz
>
> 8. Import sql statements into new database on new machine
>
> Open mysql:
>
> mysql -u root-p
>
> Then in mysql:
>
> use reviewboard;
> source /root/reviewboard.sql;
>
> This runs fine without errors now. (Had to increase max packet size to 16M
> <https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_allowed_packet>
> )
>
> 9. Upgrade reviewboard site
>
> rb-site upgrade /var/www/reviews/
>
> First error I get here is:
>
> OSError: [Errno 17] File exists: '/var/www/reviews/htdocs/errordocs'
>
> Once I delete that symlink it seems to get past that but then I get the
> following:
>
> Rebuilding directory structure
> Upgrading site settings_local.py
> Updating database. This may take a while.
>
> The log output below, including warnings and errors,
> can be ignored unless upgrade fails.
>
> ------------------ <begin log output> ------------------
> Creating tables ...
> Upgrading Review Board from 2.0.20 to 3.0.3
> There are unapplied evolutions for accounts.
> There are unapplied evolutions for attachments.
> There are unapplied evolutions for changedescs.
> There are unapplied evolutions for diffviewer.
> There are unapplied evolutions for notifications.
> There are unapplied evolutions for oauth.
> There are unapplied evolutions for reviews.
> There are unapplied evolutions for site.
> There are unapplied evolutions for webapi.
> Adding baseline version for new models
> Evolutions in notifications baseline: webhooktarget_extra_state,
> webhooktarget_extra_data_null
> Evolutions in oauth baseline: disabled_for_security
> Project signature has changed - an evolution is required
> Installing custom SQL ...
> Installing indexes ...
> Installed 0 object(s) from 0 fixture(s)
>
> This may take a while. Please be patient, and do not cancel the upgrade!
>
> Applying database evolutions for accounts...
> Applying database evolutions for attachments...
> Applying database evolutions for changedescs...
> Applying database evolutions for diffviewer...
> Applying database evolutions for reviews...
> Database evolutions for reviews failed!
> The SQL statement was: CREATE TABLE `reviews_review_general_comments` (
>     `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
>     `review_id` integer NOT NULL,
>     `generalcomment_id` integer NOT NULL,
>     UNIQUE (`review_id`, `generalcomment_id`)
> )
> ;
> The database error was: (1050, "Table 'reviews_review_general_comments'
> already exists")
>
> CommandError: Error applying evolution for reviews: (1050, "Table
> 'reviews_review_general_comments' already exists")
>
> I have two questions at this point.
>
> 1. Does this seem like the proper steps to take to migrate from my old
> server to the new one with the newer ReviewBoard version?
> 2. What can I do about the error I'm getting while running the rb-site
> upgrade?
>
> Thanks,
> Chris
>
> On Tuesday, March 13, 2018 at 1:03:37 PM UTC-7, Chris Lang wrote:
>>
>> Hmmm, I did a few things since yesterday, reinstalled ReviewBoard, did
>> the rb-site upgrade again and now the site is showing in the browser but
>> there are no review requests, nothing in console, and nothing new in the
>> reviewboard log.
>>
>> Any ideas?
>>
>> Thanks,
>> Chris
>>
>> On Monday, March 12, 2018 at 6:59:32 PM UTC-7, Christian Hammond wrote:
>>>
>>> Hi Chris,
>>>
>>> Looks like it’s using PIL, which is deprecated and in your case missing
>>> some dependency. You’ll need to uninstall it and install pillow instead
>>> (which can probably be fetched from your distro, or if not, pip — upgrade
>>> pip first).
>>>
>>> If you use pip, watch its output for the dependencies it finds. If any
>>> are missing, you’ll need the development packages from your distro.
>>>
>>> Christian
>>>
>>>
>>> On Mon, Mar 12, 2018 at 14:08 Chris Lang <crla...@gmail.com> wrote:
>>>
>>>> Hey Christian,
>>>>
>>>> It almost all went smoothly. Currently I'm getting a 500 error from
>>>> reviewboard.
>>>> I checked the log and found the following error:
>>>>
>>>> 2018-03-12 07:46:54,793 - ERROR -  - Error thumbnailing image file
>>>> uploaded/files/2018/03/12/59e3f458-2488-4a83-8236-5542dfd7337a__cloverleaf.gif
>>>> and saving as
>>>> uploaded/files/2018/03/12/59e3f458-2488-4a83-8236-5542dfd7337a__cloverleaf_800x200.gif:
>>>> encoder zip not available
>>>> Traceback (most recent call last):
>>>>   File
>>>> "/usr/lib/python2.7/site-packages/Djblets-0.8.23-py2.7.egg/djblets/util/templatetags/djblets_images.py",
>>>> line 120, in thumbnail
>>>>     save_image_to_storage(image, storage, miniature)
>>>>   File
>>>> "/usr/lib/python2.7/site-packages/Djblets-0.8.23-py2.7.egg/djblets/util/templatetags/djblets_images.py",
>>>> line 48, in save_image_to_storage
>>>>     image.save(file, 'png')
>>>>   File
>>>> "/usr/lib/python2.7/site-packages/PIL-1.1.7-py2.7-linux-x86_64.egg/Image.py",
>>>> line 1439, in save
>>>>     save_handler(self, fp, filename)
>>>>   File
>>>> "/usr/lib/python2.7/site-packages/PIL-1.1.7-py2.7-linux-x86_64.egg/PngImagePlugin.py",
>>>> line 572, in _save
>>>>     ImageFile._save(im, _idat(fp, chunk), [("zip", (0,0)+im.size, 0,
>>>> rawmode)])
>>>>   File
>>>> "/usr/lib/python2.7/site-packages/PIL-1.1.7-py2.7-linux-x86_64.egg/ImageFile.py",
>>>> line 481, in _save
>>>>     e = Image._getencoder(im.mode, e, a, im.encoderconfig)
>>>>   File
>>>> "/usr/lib/python2.7/site-packages/PIL-1.1.7-py2.7-linux-x86_64.egg/Image.py",
>>>> line 401, in _getencoder
>>>>     raise IOError("encoder %s not available" % encoder_name)
>>>> IOError: encoder zip not available
>>>>
>>>> Let me know if you've seen this before, otherwise I'm still looking
>>>> into how to resolve it.
>>>>
>>>> Just wanted to give an update.
>>>>
>>>> @Stephen, yea I went and tried to do yum install ReviewBoard but it
>>>> gave me 2.5 as you pointed out. Easy_install seems to have worked well for
>>>> the most part but ya it'd be nice to have the lastest version of
>>>> ReviewBoard in EPEL.
>>>>
>>>>
>>>> On Friday, March 9, 2018 at 7:53:04 PM UTC-8, Stephen Gallagher wrote:
>>>>
>>>>> Just to mention, I maintain an RPM packaged version of the 2.5 series
>>>>> for RHEL and Centos in the EPEL repository which should avoid the version
>>>>> compatibility question. (I don't work for Beanbag Inc., it's a volunteer
>>>>> effort)
>>>>>
>>>>> I have it on my TO DO list to get 3.x out for EPEL, but my regular job
>>>>> has kept me swamped for the last couple months. Hopefully soon, though.
>>>>>
>>>>> On Fri, Mar 9, 2018, 3:23 PM Chris Lang <crla...@gmail.com> wrote:
>>>>>
>>>>>> I will take your advice and upgrade, thats great to hear that I will
>>>>>> be able to install the newer version.
>>>>>> I'll go ahead and try that out and then let you know how it goes.
>>>>>>
>>>>>> Thanks for your help Christian!
>>>>>>
>>>>>>
>>>>>> On Thursday, March 8, 2018 at 6:52:53 PM UTC-8, Christian Hammond
>>>>>> wrote:
>>>>>>
>>>>>>> As long as you have a backup of the database and site directory, you
>>>>>>> have nothing to worry about. It's perfectly safe to install a newer 
>>>>>>> version
>>>>>>> of Review Board on the target server, copy the site directory over to 
>>>>>>> the
>>>>>>> same path as on the old server, and then do a 'rb-site upgrade'. It will
>>>>>>> upgrade the database to Review Board 3.0.
>>>>>>>
>>>>>>> (3.0 is the recommended version at this point.)
>>>>>>>
>>>>>>> If you want to use the older version on the new server for now, you
>>>>>>> can locate the site-packages directory containing the old Review Board
>>>>>>> install and see the versions of the packages you were using there. You 
>>>>>>> can
>>>>>>> force the installation of the appropriate versions with:
>>>>>>>
>>>>>>>     sudo easy_install package_name==version
>>>>>>>
>>>>>>> Christian
>>>>>>>
>>>>>>
>>>>>>> On Thu, Mar 8, 2018 at 12:30 PM, Chris Lang <crla...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> I'm thinking it'll be safer to move to the new machine first and
>>>>>>>> then upgrade, and in case anything goes wrong with the upgrade, the 
>>>>>>>> team
>>>>>>>> can continue using the old server.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thursday, March 8, 2018 at 12:24:40 PM UTC-8, Chris Lang wrote:
>>>>>>>>>
>>>>>>>>> Do you think it'd be easier to upgrade first and then move to the
>>>>>>>>> new server? CentOS -> Redhat.
>>>>>>>>> I'm trying to minimize downtime since our developers use it around
>>>>>>>>> the clock.
>>>>>>>>>
>>>>>>>>> On Thursday, March 8, 2018 at 12:17:42 PM UTC-8, Chris Lang wrote:
>>>>>>>>>>
>>>>>>>>>> Hey Christian,
>>>>>>>>>>
>>>>>>>>>> Yes, I'm moving between servers for security reasons. What
>>>>>>>>>> version of ReviewBoard would you recommend upgrading to?
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> Chris
>>>>>>>>>>
>>>>>>>>>> On Thursday, March 8, 2018 at 12:08:03 PM UTC-8, Christian
>>>>>>>>>> Hammond wrote:
>>>>>>>>>>>
>>>>>>>>>>> Hi Chris,
>>>>>>>>>>>
>>>>>>>>>>> Django 1.6.11 is correct. You likely have something installed on
>>>>>>>>>>> the server that wants a newer version. It’s possible some dependency
>>>>>>>>>>> required by Review Board or another of its dependencies picked it 
>>>>>>>>>>> up.
>>>>>>>>>>>
>>>>>>>>>>> This is fixable, but first, can you tell me why you’re
>>>>>>>>>>> installing 2.0.20? Are you moving between servers?  I ask because 
>>>>>>>>>>> except
>>>>>>>>>>> for major security issues, we’re no longer maintaining this release 
>>>>>>>>>>> outside
>>>>>>>>>>> of support contracts.
>>>>>>>>>>>
>>>>>>>>>>> Christian
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Mar 8, 2018 at 10:56 Chris Lang <crla...@gmail.com>
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> I'm trying to install ReviewBoard 2.0.20 on RedHat 7.4 but am
>>>>>>>>>>>> getting an error when running rb-site install.
>>>>>>>>>>>>
>>>>>>>>>>>> I initially installed ReviewBoard with easy_install
>>>>>>>>>>>> ReviewBoard==2.0.20.
>>>>>>>>>>>>
>>>>>>>>>>>> The current errors I'm getting are:
>>>>>>>>>>>>
>>>>>>>>>>>>   File "/usr/lib/python2.7/site-packages/pkg_resources.py",
>>>>>>>>>>>> line 626, in resolve
>>>>>>>>>>>>     raise DistributionNotFound(req)
>>>>>>>>>>>> pkg_resources.DistributionNotFound: Django>=1.6.11,<1.7
>>>>>>>>>>>>
>>>>>>>>>>>> and
>>>>>>>>>>>>
>>>>>>>>>>>>   File "/usr/lib/python2.7/site-packages/pkg_resources.py",
>>>>>>>>>>>> line 630, in resolve
>>>>>>>>>>>>     raise VersionConflict(dist,req) # XXX put more info here
>>>>>>>>>>>> pkg_resources.VersionConflict: (Django 1.6.11
>>>>>>>>>>>> (/usr/lib/python2.7/site-packages), 
>>>>>>>>>>>> Requirement.parse('Django>=1.8,<1.12'))
>>>>>>>>>>>>
>>>>>>>>>>>> I cannot get a version of Django that satisfies both. Not sure
>>>>>>>>>>>> what to do from here.
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>> Chris
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Supercharge your Review Board with Power Pack:
>>>>>>>>>>>> https://www.reviewboard.org/powerpack/
>>>>>>>>>>>> Want us to host Review Board for you? Check out RBCommons:
>>>>>>>>>>>> https://rbcommons.com/
>>>>>>>>>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>>>>>>>>>> ---
>>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>>> Google Groups "Review Board Community" group.
>>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from
>>>>>>>>>>>> it, send an email to reviewboard...@googlegroups.com.
>>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> --
>>>>>>>>>>> Christian Hammond
>>>>>>>>>>> President/CEO of Beanbag
>>>>>>>>>>> Makers of Review Board
>>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>> Supercharge your Review Board with Power Pack:
>>>>>>>> https://www.reviewboard.org/powerpack/
>>>>>>>> Want us to host Review Board for you? Check out RBCommons:
>>>>>>>> https://rbcommons.com/
>>>>>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>>>>>> ---
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "Review Board Community" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to reviewboard...@googlegroups.com.
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Christian Hammond
>>>>>>> President/CEO of Beanbag <https://www.beanbaginc.com/>
>>>>>>> Makers of Review Board <https://www.reviewboard.org/>
>>>>>>>
>>>>>> --
>>>>>> Supercharge your Review Board with Power Pack:
>>>>>> https://www.reviewboard.org/powerpack/
>>>>>> Want us to host Review Board for you? Check out RBCommons:
>>>>>> https://rbcommons.com/
>>>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>>>> ---
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Review Board Community" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to reviewboard...@googlegroups.com.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>> --
>>>> Supercharge your Review Board with Power Pack:
>>>> https://www.reviewboard.org/powerpack/
>>>> Want us to host Review Board for you? Check out RBCommons:
>>>> https://rbcommons.com/
>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Review Board Community" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to reviewboard...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> --
>>> --
>>> Christian Hammond
>>> President/CEO of Beanbag
>>> Makers of Review Board
>>>
>> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "Review Board Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to