Restore Reviewboard, Disaster happened.

16 views
Skip to first unread message

Danila Ladner

unread,
Jan 14, 2020, 8:21:34 PM1/14/20
to Review Board Community
Hello guys i am in need of RB help.
I have lost my reviewboard installation, i only have mysql backup of it but no site files which were on separate disk and which by accident wasn't included in backup schedule and died.
I think my RB version was 3.1 or 3.2 but not sure ( is there a way to find it from mysql)?
I do have old site files though 2 years ago, when version was 2.5.1 but since was upgraded multiple times.
But i do have access to the  SECRET_KEY setting in conf/settings_local.py

Do i have any chance of restoring this?
Thank you in advance, really in big trouble for this.

Eric Johnson

unread,
Jan 15, 2020, 1:46:44 PM1/15/20
to Review Board Community
I'm not a developer for the tool, but I've poked around on the innards enough to take some stabs at guesses.


On Tuesday, January 14, 2020 at 5:21:34 PM UTC-8, Danila Ladner wrote:
Hello guys i am in need of RB help.
I have lost my reviewboard installation, i only have mysql backup of it but no site files which were on separate disk and which by accident wasn't included in backup schedule and died.

The site files can be regenerated - except for the attachments that users might have added to reviews. You can see what you might be missing with the "attachments_fileattachment" in MySQL.
 
I think my RB version was 3.1 or 3.2 but not sure ( is there a way to find it from mysql)?

Certainly not 3.1 or 3.2, since no such release exists yet: https://downloads.reviewboard.org/releases/ReviewBoard/ 

The django_evolutions table in the database lists the evolutions that have been applied to the database. So if you've done multiple upgrades, the last upgrade you did is implied by the last evolution listed in this table. If you grab the source, you can search inside the source for the .py file matching the name of the evolution. If you find it, then go to the source and see which release first has the file - that's your release.
 
I do have old site files though 2 years ago, when version was 2.5.1 but since was upgraded multiple times.

You probably want to use that, just to get access to attached files.
 
But i do have access to the  SECRET_KEY setting in conf/settings_local.py

Turns out the SECRET_KEY is used to encrypt passwords, both for connecting to version control systems, and for local user accounts. If you lose the SECRET_KEY, you can still restore your system by resetting all the passwords.


Do i have any chance of restoring this?

Seems like, yes, except for attachments.
 
Thank you in advance, really in big trouble for this.

Regular system backups should be part of any IT operation.


David Trowbridge

unread,
Jan 17, 2020, 11:36:08 AM1/17/20
to reviewboard
Eric's answers are correct.

Note that you don't necessarily need to install the exact version that was installed previously. You can install the latest, connect it to your database, and then run the upgrade procedures.

David

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/2109d4ee-5ea8-4bab-9b62-8e2b79905b37%40googlegroups.com.

Danila Ladner

unread,
Jan 17, 2020, 11:58:21 AM1/17/20
to revie...@googlegroups.com
Sorry for late reply.
I was able to restore by just running rb-site install and pointing it to my mysql db, also i was able to find my previously installed version by running mysql select;

MariaDB [reviewboard]> select version from siteconfig_siteconfiguration;
+---------+
| version |
+---------+
| 3.0.8   |
+---------+
1 row in set (0.00 sec)

MariaDB [reviewboard]>

Thank you all very much.


Reply all
Reply to author
Forward
0 new messages