Hello again, For illustration purposes my source site is called "rb-test.example.com", runs over http and contains some data (comments, git repositories etc.) Destination is called "rebo.example.com", runs over https, and contains no data. All usernames and passwords (including MySQL) are the same on both.
I've tried the following: 1. Migrated db as before (checked the sql dump for any occurrences of "rb-test" or "http" but there were none) 2. Moved the entire rb-test:/var/www/rb-test.example.com directory to rebo:/var/www/rebo.example.com 3. Searched recursively for any occurrence of "rb-test" and replaced it with "rebo" in: conf/settings_local.pyc conf/cron.conf conf/apache-wsgi.conf conf/settings_local.py htdocs/reviewboard.wsgi 4. Replaced SECRET_KEY in conf/settings_local.py to match the database i.e. rb-test 5. Rebooted the rebo container. MY ERRORS: Environment: Request Method: GET Request URL: https://rebo.example.com/ Django Version: 1.6.11 Python Version: 2.7.13 Installed Applications: [u'corsheaders', u'django.contrib.admin', u'django.contrib.auth', u'django.contrib.contenttypes', u'django.contrib.sites', u'django.contrib.sessions', u'django.contrib.staticfiles', u'djblets', u'djblets.avatars', u'djblets.configforms', u'djblets.datagrid', u'djblets.extensions', u'djblets.features', u'djblets.feedview', u'djblets.forms', u'djblets.gravatars', u'djblets.integrations', u'djblets.log', u'djblets.pipeline', u'djblets.privacy', u'djblets.recaptcha', u'djblets.siteconfig', u'djblets.util', u'haystack', u'oauth2_provider', u'pipeline', u'reviewboard', u'reviewboard.accounts', u'reviewboard.admin', u'reviewboard.attachments', u'reviewboard.avatars', u'reviewboard.changedescs', u'reviewboard.diffviewer', u'reviewboard.extensions', u'reviewboard.hostingsvcs', u'reviewboard.integrations', u'reviewboard.notifications', u'reviewboard.oauth', u'reviewboard.reviews', u'reviewboard.scmtools', u'reviewboard.site', u'reviewboard.webapi', u'django_evolution'] Installed Middleware: [u'django.middleware.gzip.GZipMiddleware', u'reviewboard.admin.middleware.InitReviewBoardMiddleware', u'corsheaders.middleware.CorsMiddleware', u'django.middleware.clickjacking.XFrameOptionsMiddleware', u'django.middleware.common.CommonMiddleware', u'django.middleware.http.ConditionalGetMiddleware', u'django.middleware.locale.LocaleMiddleware', u'django.contrib.sessions.middleware.SessionMiddleware', u'django.contrib.auth.middleware.AuthenticationMiddleware', u'django.contrib.messages.middleware.MessageMiddleware', u'djblets.siteconfig.middleware.SettingsMiddleware', u'reviewboard.admin.middleware.LoadSettingsMiddleware', u'djblets.extensions.middleware.ExtensionsMiddleware', u'djblets.integrations.middleware.IntegrationsMiddleware', u'djblets.log.middleware.LoggingMiddleware', u'reviewboard.accounts.middleware.TimezoneMiddleware', u'reviewboard.accounts.middleware.UpdateLastLoginMiddleware', u'reviewboard.admin.middleware.CheckUpdatesRequiredMiddleware', u'reviewboard.accounts.middleware.X509AuthMiddleware', u'reviewboard.site.middleware.LocalSiteMiddleware', u'djblets.extensions.middleware.ExtensionsMiddlewareRunner', u'reviewboard.admin.middleware.ExtraExceptionInfoMiddleware'] Traceback: File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response 88. response = middleware_method(request) File "/usr/local/lib/python2.7/dist-packages/reviewboard/admin/middleware.py" in process_request 27. initialize() File "/usr/local/lib/python2.7/dist-packages/reviewboard/__init__.py" in initialize 144. siteconfig = SiteConfiguration.objects.get_current() File "/usr/local/lib/python2.7/dist-packages/djblets/siteconfig/managers.py" in get_current 42. return self.get_for_site_id(Site.objects.get_current().pk) File "/usr/local/lib/python2.7/dist-packages/django/contrib/sites/models.py" in get_current 47. current_site = self.get(pk=sid) File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py" in get 151. return self.get_queryset().get(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in get 310. self.model._meta.object_name) Exception Type: DoesNotExist at / Exception Value: Site matching query does not exist. --------------------------------------------------------------------------------------- The site is meant to run under https and redirect all http requests to https. My /etc/apache2/sites-enabled/rebo.example.com looks like below: --------------------------------------------------------------------------------------- <VirtualHost *:80> ServerName rebo.example.com Redirect "/" "https://rebo.example.com/" </VirtualHost> <VirtualHost *:443> ServerName rebo.example.com DocumentRoot "/var/www/rebo.example.com/htdocs" # Error handlers ErrorDocument 500 /errordocs/500.html WSGIPassAuthorization On WSGIScriptAlias "/" "/var/www/rebo.example.com/htdocs/reviewboard.wsgi/" <Directory "/var/www/rebo.example.com/htdocs"> AllowOverride All Options -Indexes +FollowSymLinks Allow from all </Directory> # Prevent the server from processing or allowing the rendering of # certain file types. <Location "/media/uploaded"> SetHandler None Options None AddType text/plain .html .htm .shtml .php .php3 .php4 .php5 .phps .asp AddType text/plain .pl .py .fcgi .cgi .phtml .phtm .pht .jsp .sh .rb <IfModule mod_php5.c> php_flag engine off </IfModule> # Force all uploaded media files to download. <IfModule mod_headers.c> Header set Content-Disposition "attachment" </IfModule> </Location> # Alias static media requests to filesystem Alias /media "/var/www/rebo.example.com/htdocs/media" Alias /static "/var/www/rebo.example.com/htdocs/static" Alias /errordocs "/var/www/rebo.example.com/htdocs/errordocs" Alias /favicon.ico "/var/www/ rebo.example.com/htdocs/static/rb/images/favicon.png" SSLEngine on SSLOptions +StrictRequire SSLCipherSuite HIGH:MEDIUM SSLCertificateKeyFile /etc/ssl/rebo/rebo.key SSLCertificateFile /etc/ssl/rebo/rebo.crt SSLCertificateChainFile /etc/ssl/rebo/cacerts.pem </VirtualHost> --------------------------------------------------------------------------------------- Does ReviewBoard support https? Does it support migration from http to https? Does it support migration from one site name (subdomain in my case) to another? What am I missing and why I'm seeing these errors? Regards, Adam On Tue, 28 Jul 2020 at 17:40, Paul Mansfield <paul.mansfi...@agileanalog.com> wrote: > > AIUI, it's all in the database. > https://groups.google.com/g/reviewboard/c/KHjIWCU_YJo > > well, apart from people's avatars, so I would back up htdocs/media/ > > > On Tue, 28 Jul 2020 at 17:16, Adam Weremczuk <veremch...@gmail.com> wrote: > >> Hi Paul, >> >> Thanks for the hint, I'll bear it in mind. >> >> What I'm after really is a site migration procedure applicable to my >> environment. >> >> If there is no official documentation in place maybe somebody could at >> least provide a list of steps? >> >> Regards, >> Adam >> >> >> On Tue, 28 Jul 2020 at 17:04, Paul Mansfield < >> paul.mansfi...@agileanalog.com> wrote: >> >>> did you restore your SECRET_KEY? >>> >>> check your reviewboard settings_local.py file >>> >>> mine is in /var/www/reviewboard/conf/settings_local.py because that's >>> the directory for my virtual http server >>> >>> in there you'll find this: >>> # Unique secret key. Don't share this with anybody. >>> SECRET_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' >>> >>> you need to make a note/copy of that key from your live RB instance, and >>> if you restore it from a backup, put that key into the new instance. >>> >>> >>> >>> >>> On Tue, 28 Jul 2020 at 15:58, Adam Weremczuk <veremch...@gmail.com> >>> wrote: >>> >>>> Hi all, >>>> >>>> Today I've attempted a migration from: >>>> >>>> Debian 9.3 >>>> Apache 2.4.25 >>>> MySQL 5.7.30 >>>> ReviewBoard 3.0.17 >>>> >>>> to: >>>> >>>> Debian 9.13 >>>> Apache 2.4.25 >>>> MySQL 5.7.31 >>>> ReviewBoard 3.0.18 >>>> >>>> Rather small differences and I didn't expect much trouble. >>>> >>>> I started with migrating database (mysqldump) which resulted in the >>>> following error: >>>> >>>> >>>> >>>> >>>> *Something broke! (Error 500)It appears something broke when you tried >>>> to go to here. This is either a bug in Review Board or a server >>>> configuration error. Please report this to your administrator.[Tue Jul 28 >>>> 13:05:08.361856 2020] [wsgi:error] [pid 1650:tid 140483573556992] [client >>>> 10.200.20.2:53391 <http://10.200.20.2:53391>] ERROR:root:Could not load >>>> siteconfig: Site matching query does not exist.* >>>> >>>> When I dropped the database and restored the original the error didn't >>>> go away which I found really strange. In order to get a fully functional >>>> vanilla RB 3.0.18 back on the destination I had to restore the entire >>>> container from a pre-db-fiddling backup. >>>> >>>> By looking at the content of mysqldump it doesn't look like db >>>> migration should be necessary anyway. The differences between a vanilla and >>>> data populated dump where down to: >>>> >>>> *ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;* >>>> >>>> vs >>>> >>>> *ENGINE=InnoDB DEFAULT CHARSET=utf8;* >>>> >>>> Is it ok to just copy "repository-clones", "data" and "conf" >>>> directories over? >>>> >>>> Is what I'm trying to achieve documented somewhere step by step in >>>> details? >>>> >>>> Please advise. >>>> >>>> Regards, >>>> Adam >>>> >>>> -- >>>> 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. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/reviewboard/CALC-DAHJf%3DF1nzFF-TwhugqA1Dgj4azZ8F83jLNBofjBZbXFsw%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/reviewboard/CALC-DAHJf%3DF1nzFF-TwhugqA1Dgj4azZ8F83jLNBofjBZbXFsw%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> >>> >>> -- >>> P Mansfield, Senior DevOps Engineer, Agile Analog Ltd >>> GPG fingerprint: 8BC9D73EE3D4669C1C138ABD41D5B0C9030D4AE6 >>> >>> -- >>> 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. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/reviewboard/CAMukpcDhwVvxF3kXmFF1VnMbW-ud3DDJmAWkuzyHATXHabnS3Q%40mail.gmail.com >>> <https://groups.google.com/d/msgid/reviewboard/CAMukpcDhwVvxF3kXmFF1VnMbW-ud3DDJmAWkuzyHATXHabnS3Q%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> 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. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/reviewboard/CALC-DAHeTAo1A4xRLN65TOojQrcgCn6k%3D%2B5PVpu4jHNHsiJwpg%40mail.gmail.com >> <https://groups.google.com/d/msgid/reviewboard/CALC-DAHeTAo1A4xRLN65TOojQrcgCn6k%3D%2B5PVpu4jHNHsiJwpg%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > P Mansfield, Senior DevOps Engineer, Agile Analog Ltd > GPG fingerprint: 8BC9D73EE3D4669C1C138ABD41D5B0C9030D4AE6 > > -- > 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/reviewboard/CAMukpcDgErf%3D8xgG62T9FJMbj_a8daNC2RuYWRZFv4GiJjEgUw%40mail.gmail.com > <https://groups.google.com/d/msgid/reviewboard/CAMukpcDgErf%3D8xgG62T9FJMbj_a8daNC2RuYWRZFv4GiJjEgUw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/CALC-DAHU%2BVcehkQTa8au-tVYh4zf%2B_B2cTXDC88vYmcu2yRBgA%40mail.gmail.com.