Hi Daniel,

It does look like an encoding conflict. We recommend using UTF-8 for all 
database encodings, but MySQL generally defaults to latin1. My guess is that 
this password uses some sort of latin1 character (Õ, from the looks of it), 
which is failing to be converted to UTF-8.

For most of the database, you can convert the tables and content to use UTF-8. 
There's a bunch of articles online for doing this. However, it won't affect the 
repository passwords, as we store those encrypted. Instead, you'll need to go 
in and actually re-enter the passwords for the repositories.

Another option is to write a little Python script that uses this. You'd do 
something like:

    $ rb-site manage /path/to/site shell
    >>> from reviewboard.scmtools.models import Repository
    >>> for repo in Repository.objects.all():
    >>>     repo.password = repo.password.decode('latin1')
    >>>     repo.save()

I would test this first on a copy of the database in case it doesn't do what 
we'd expect.

If it's not a big deal to just re-type the passwords, or just re-save the 
repository configuration (that may be sufficient), then I'd just do that. 
Certainly, you can test it with that failing repository first.

Hope that helps!

Christian

--  
Christian Hammond - christ...@beanbaginc.com  
Review Board - https://www.reviewboard.org  
Beanbag, Inc. - https://www.beanbaginc.com

-----Original Message-----
From: Daniel Laird <daniel.j.la...@googlemail.com>
Reply: reviewboard@googlegroups.com <reviewboard@googlegroups.com>>
Date: December 22, 2014 at 4:53:36 AM
To: reviewboard@googlegroups.com <reviewboard@googlegroups.com>>
Subject:  Backup and Restore of Reviewboard 2.0 failing (mysqldump issues)

> All,
>  
> Since RB 1.5 I have backed up the RB installation everynight be by using
> mysqldump user=x password=y reviewboard > backup.sql
>  
> I have also backed up all attachments etc.
> I could then restore the data easily with another script.
>  
> I used this method to upgrade from 1.7.25 -> 2.0.11 and with the additional
> rb-site upgrade etc, it all worked great.
> However, after 2 days I noticed an error on my setup and re-created the
> site and re-imported the data.
>  
> At this point it was a RB 2.0.11 backup being restored to a RB2.0.11
> database.
> It all appeared to go ok, but when I clicked on any review i got
> Error 500, something broke, I also got the following email:
>  
> Traceback (most recent call last):
>  
> File
> "/usr/local/lib/python2.7/dist-packages/Django-1.6.8-py2.7.egg/django/core/handlers/base.py",
>   
> line 112, in get_response
> response = wrapped_callback(request, *callback_args, **callback_kwargs)
>  
> File
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.11-py2.7.egg/reviewboard/accounts/decorators.py",
>   
> line 23, in _check
> return view_func(*args, **kwargs)
>  
> File
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.11-py2.7.egg/reviewboard/site/decorators.py",
>   
> line 35, in _check
> return view_func(request, local_site=local_site, *args, **kwargs)
>  
> File
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.11-py2.7.egg/reviewboard/reviews/views.py",
>   
> line 710, in review_detail
> 'screenshots': screenshots,
>  
> File
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.11-py2.7.egg/reviewboard/reviews/context.py",
>   
> line 92, in make_review_request_context
> upload_diff_form = UploadDiffForm(review_request, request=request)
>  
> File
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.11-py2.7.egg/reviewboard/reviews/forms.py",
>   
> line 95, in __init__
> data, *args, **kwargs)
>  
> File
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.11-py2.7.egg/reviewboard/diffviewer/forms.py",
>   
> line 41, in __init__
> if self.repository.get_scmtool().get_diffs_use_absolute_paths():
>  
> File
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.11-py2.7.egg/reviewboard/scmtools/models.py",
>   
> line 230, in get_scmtool
> return cls(self)
>  
> File
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.11-py2.7.egg/reviewboard/scmtools/svn/__init__.py",
>   
> line 73, in __init__
> local_site_name)
>  
> File
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.11-py2.7.egg/reviewboard/scmtools/svn/__init__.py",
>   
> line 415, in build_client
> client = Client(config_dir, repopath, username, password)
>  
> File
> "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.11-py2.7.egg/reviewboard/scmtools/svn/pysvn.py",
>   
> line 41, in __init__
> self.client.set_default_password(six.text_type(password))
>  
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xd5 in position 0:
> ordinal not in range(128)
>  
> Has something changed in the internal data structures?
> Should I be using some options like "--default-character-set=utf8" when
> dumping/importing the database?
>  
> Hope you can help
> Dan
>  
> --
> Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
> ---
> Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
> ---
> Happy user? Let us know at http://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups 
> "reviewboard"  
> 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.
>  

-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" 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