database backup and restore

356 views
Skip to first unread message

Lokesh Rajoria

unread,
May 31, 2018, 9:27:15 AM5/31/18
to Review Board Community
Hi,

I am trying to take backup my reviewboard server but after restore command reviewboard giving database error.

backup from one machine: Reviewboard version 2.0.18
mysqldump -u [user] -p [database_name] > [filename].sql
Restore to another machine; Reviewboard version 3.0
mysql -u [new_user] -p [database_name] < [file_name].sql


[root@localhost Rajoria]# systemctl status httpd.service
â httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           ââreviewboard-sites.conf
   Active: failed (Result: exit-code) since Thu 2018-05-31 18:43:20 IST; 3min 14s ago
  Process: 5021 ExecStartPre=/usr/bin/rb-site upgrade --all-sites (code=exited, status=1/FAILURE)
 Main PID: 1939 (code=exited, status=0/SUCCESS)

May 31 18:43:20 localhost.localdomain rb-site[5021]: Installed 0 object(s) from 0 fixture(s)
May 31 18:43:20 localhost.localdomain rb-site[5021]: This may take a while. Please be patient, and do not cancel the upgrade!
May 31 18:43:20 localhost.localdomain rb-site[5021]: Applying database evolutions for accounts...
May 31 18:43:20 localhost.localdomain rb-site[5021]: Database evolutions for accounts failed!
May 31 18:43:20 localhost.localdomain rb-site[5021]: The SQL statement was: ALTER TABLE `accounts_profile` ADD COLUMN `settings` longtext NULL;
May 31 18:43:20 localhost.localdomain rb-site[5021]: The database error was: (1060, "Duplicate column name 'settings'")
May 31 18:43:20 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
May 31 18:43:20 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
May 31 18:43:20 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
May 31 18:43:20 localhost.localdomain systemd[1]: httpd.service failed.

Please guide us. what table we need to update.

Thanks & Regrads,
Lokesh

Christian Hammond

unread,
Jun 4, 2018, 5:39:45 PM6/4/18
to revie...@googlegroups.com
Hi Lokesh,

A dump and restore should work fine. Can you verify that the database you were restoring into was completely empty (no tables) when loading in the schema?

Christian

--
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

Lokesh Rajoria

unread,
Jun 5, 2018, 5:26:26 AM6/5/18
to Review Board Community
Hi Christian,

I am following below procedure for taking backup and restore.

rb site already created in machine A and B

backup from A machine: Reviewboard version 2.0.18
mysqldump -u [user] -p [database_name] > [filename].sql
Restore to B machine; Reviewboard version 3.0
mysql -u [new_user] -p [database_name] < [file_name].sql

copied successfully.

restarting Apache services.

then showing error.

another procedure i am following.

machine B rb site creating after restoring the database.
it working fine but review id information showing 500 error. i mean it's unable to fetch review id information.

Thanks & Regards,
Lokesh

Paul Mansfield

unread,
Sep 20, 2019, 8:50:55 AM9/20/19
to Review Board Community
Might I suggest a specific section be added to the admin guide explaining how to backup and restore a reviewboard installation?
there's no mention of it here
if you're restoring a broken system, do you simply install the same version you had, and then restore the database?

Christian Hammond

unread,
Sep 22, 2019, 12:11:51 AM9/22/19
to revie...@googlegroups.com
I thought I had written a guide on this, but apparently not.

That’s correct, you’d install the same version, a backup of the database, and, just as important, the original or a copy of the site directory. The SECRET_KEY setting in conf/settings_local.py is required for various forms of content (i.e., encrypted repository credentials) in the database, so it’s important not to simply generate a new one.

Christian


--
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.
--
Reply all
Reply to author
Forward
0 new messages