Proper way to backup RT Database

I just lost my Service Desk database. I did a test creating a ticket,
saw what I wanted, then restored the database previously. It didn’t
restore. So I dropped all tables, did a restore. RT broke. I checked the
tables restored & it only did 45 out of 68.

So now I get to rebuild the RT configuration again (not that bad).

The command I’m using to backup my RT databases is:
mysqldump -u root -p --result-file=G:\BACKUPS\RT-.sql

Is this how the database should get backed up? Why did it only back up
some tables but not all? I’ve already got one RT system with a borked
database I haven’t been able to get help with yet. With the scale of the
one I’m going to be launching I CANNOT afford for backups/restores to
not work.

Stephen Cena
QVII
MIS/IT Dept
850 Hudson Ave.
Rochester, NY. 14620
585-544-0450 x300
sjc@qvii.com
“Thank you for helping us help you help us all.”
–For email related issues, please contact postmaster@qvii.com

I just lost my Service Desk database. I did a test creating a ticket,
saw what I wanted, then restored the database previously. It didn’t
restore. So I dropped all tables, did a restore. RT broke. I checked the
tables restored & it only did 45 out of 68.
So now I get to rebuild the RT configuration again (not that bad).
The command I’m using to backup my RT databases is:
mysqldump -u root -p --result-file=G:\BACKUPS\RT-.sql
Is this how the database should get backed up? Why did it only back up
some tables but not all? I’ve already got one RT system with a borked
database I haven’t been able to get help with yet. With the scale of the
one I’m going to be launching I CANNOT afford for backups/restores to
not work.

There are docs on backups here that might help:

http://bestpractical.com/rt/docs/latest/backups.html

Those dump just the RT database.

Also, maybe show the command you used to restore from the backup? Any
errors during the dump or restore?

No errors showed up in the command prompt when I ran the back up. I did
get the “warning: don’t put a password in the file its dangerous” (which
I expected).

First, I used the GUI to restore (MySQL Workbench). I pointed it to the
.SQL file, told it to overwrote ‘rt4service’ and clicked “Import”. It
imported the 45 tables that were exported.

For the console version, I did:

mysql -u root -p rt4service < backup.sql

Which also didn’t work. I think what happened is it just didn’t get all
68 tables. It just did 45. Then, when I dropped all the tables because
all my “old” data was still present after there were obviously tables
missing.

I’m going to take a look at the link provided & then do some more
testing. (This might also explain why I had such awful lick with moving
from MySQL to MariaDB and back).

Stephen Cena
QVII
MIS/IT Dept
850 Hudson Ave.
Rochester, NY. 14620
585-544-0450 x300
sjc@qvii.com
“Thank you for helping us help you help us all.”
–For email related issues, please contact postmaster@qvii.comFrom: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of
rt-users-request@lists.bestpractical.com
Sent: Thursday, May 23, 2013 12:00 PM
To: rt-users@lists.bestpractical.com
Subject: rt-users Digest, Vol 110, Issue 33

Send rt-users mailing list submissions to
rt-users@lists.bestpractical.com

To subscribe or unsubscribe via the World Wide Web, visit
The rt-users Archives
or, via email, send a message with subject or body ‘help’ to
rt-users-request@lists.bestpractical.com

You can reach the person managing the list at
rt-users-owner@lists.bestpractical.com

When replying, please edit your Subject line so it is more specific than
“Re: Contents of rt-users digest…”

Today’s Topics:

  1. Re: Proper way to backup RT Database (Jim Brandt)

Message: 1
Date: Thu, 23 May 2013 11:38:19 -0400
From: Jim Brandt jbrandt@bestpractical.com
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Proper way to backup RT Database
Message-ID: 519E37EB.7030607@bestpractical.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Does the interpretation of %M vs %m vary from Linux to Linux (or between Linux and other *nixes)?

When I first set up my backups I found that following the linked page to the letter I got timestamps with YearMinuteDate instead of YearMonthDate. I do a nightly SQL backup, followed by a backup of everything I’ve customized for Apache and Postfix, and use date +%Y%m%d%H%M to do a date and time stamp on my files.-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Jim Brandt
Sent: Thursday, May 23, 2013 10:38 AM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Proper way to backup RT Database

On 5/23/13 11:05 AM, Cena, Stephen (ext. 300) wrote:

I just lost my Service Desk database. I did a test creating a ticket,
saw what I wanted, then restored the database previously. It didn’t
restore. So I dropped all tables, did a restore. RT broke. I checked
the tables restored & it only did 45 out of 68.
So now I get to rebuild the RT configuration again (not that bad).
The command I’m using to backup my RT databases is:
mysqldump -u root -p --result-file=G:\BACKUPS\RT-.sql
Is this how the database should get backed up? Why did it only back up
some tables but not all? I’ve already got one RT system with a borked
database I haven’t been able to get help with yet. With the scale of
the one I’m going to be launching I CANNOT afford for backups/restores
to not work.

There are docs on backups here that might help:

http://bestpractical.com/rt/docs/latest/backups.html

Those dump just the RT database.

Also, maybe show the command you used to restore from the backup? Any errors during the dump or restore?

RT Training in Seattle, June 19-20: Training — Best Practical Solutions

Does the interpretation of %M vs %m vary from Linux to Linux (or
between Linux and other *nixes)?

When I first set up my backups I found that following the linked page
to the letter I got timestamps with YearMinuteDate instead of
YearMonthDate. I do a nightly SQL backup, followed by a backup of
everything I’ve customized for Apache and Postfix, and use date +%Y%m%d%H%M to do a date and time stamp on my files.

No, that’s a typo. Thanks, fixed!