[otrs] Try to restore OTRS

949 views
Skip to first unread message

Adi Ariyanto

unread,
Jul 26, 2012, 12:11:43 AM7/26/12
to User questions and discussions about OTRS.

First of all thank you for anyone that answer my question J

After I try run backup otrs on my otrs virtual machine, now I want to try to restore it, i got an error
 “ERROR: Already existing tables in this database. A empty database is required for restore!”
 
Information
1.  I am used my copy of OTRS vmware, it’s very fresh, just need run /installer.pl to setup
 
My question is 
1.  It’s a fresh system, I even not yet create a ticket, just test that /index.pl is opened, but why I got an error about existing tables? How to make this restore test is work ?
 
Thank you
 

 



This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Bina Nusantara.
If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone.
Please contact the sender if you believe you have received this email in error.

Bernd Backhaus

unread,
Jul 26, 2012, 12:49:24 AM7/26/12
to ot...@otrs.org
Am 26.07.2012 06:11, schrieb Adi Ariyanto:

First of all thank you for anyone that answer my question J

After I try run backup otrs on my otrs virtual machine, now I want to try to restore it, i got an error
 “ERROR: Already existing tables in this database. A empty database is required for restore!”
 
Information
1.  I am used my copy of OTRS vmware, it’s very fresh, just need run /installer.pl to setup
 
My question is 
1.  It’s a fresh system, I even not yet create a ticket, just test that /index.pl is opened, but why I got an error about existing tables? How to make this restore test is work ?


What backup tool did you use? the backup script that comes with otrs should create the correct commands...

Your  SQL dump probably contains CREATE TABLE directives without DROP TABLE, which doesn't work if the tables already exist. You could either load the SQL file (shouldn't be too big if you did not create any tickets yet), search for all

CREATE TABLE `tablename`

directives and put

DROP TABLE IF EXISTS `tablename`;

above them. You could also simply use

DROP DATABASE databasename;

and

CREATE DATABASE databasename;

(all from the mysql command shell) to create an empry database

but this is only recommended if your SQL dump includes the neccesary information about collation, character set etc.

Adi Ariyanto

unread,
Jul 27, 2012, 12:22:25 AM7/27/12
to User questions and discussions about OTRS.

Both I am use OTRS backup and restore tools

I am backup with this command /opt/otrs/scripts#./backup.pl –d /var/backup_otrs à I put the backup folder in /var/backup_otrs, and success

Then I try to restore to another otrs machine with this command

/opt/otrs/scripts# ./restore.pl –b /var/backup_otrs/2012-07-25_11-45 –d /opt/otrs

This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Bina Nusantara.
If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone.
Please contact the sender if you believe you have received this email in error.

xxx

unread,
Jul 27, 2012, 3:10:07 AM7/27/12
to User questions and discussions about OTRS.
Hi ,

I run otrs.PostMasterMailbox.pl in crontab every 5 minutes. If there are 50 mails in mailbox, the OTRS parameter PostMasterReconnectMessage is set to 10 , does it mean that otrs.PostMasterMailbox.pl will reconnect POP3 server after fetches 10 mails to  get other mails ? or will it stops after fetches 10 mails and connects POP3 server in next 5 minutes of cron jobs? 
Thanks!

Justin
 


xxx

unread,
Jul 27, 2012, 3:11:38 AM7/27/12
to User questions and discussions about OTRS.

Bernd Backhaus

unread,
Jul 27, 2012, 3:21:37 AM7/27/12
to ot...@otrs.org
Well, did you check the database on the target machine? Does it contain tables? If so, delete them. As explained, the backup SQL should take care of this, but... also check if there are sufficient rights to write to the database and alter / drop tables for the database user.
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Adi Ariyanto

unread,
Jul 27, 2012, 3:29:17 AM7/27/12
to User questions and discussions about OTRS.

What I have done is like this..

 

In terminal I am logon to mysql

Mysql –u root –p

Then I am DROP DATABASE otrs and CREATE DATABASE otrs then try to restore again, no error, the ticket is also restore, I don’t know if my way is safe or not..

 

But for your information

In my new linux machine I am just install apache, mysql and other dependency to install OTRS, but I am not yet run /otrs/installer.pl, I think in this condition the database just contain basic mysql database, because otrs database not yet created.

Steven Carr

unread,
Jul 27, 2012, 5:26:41 AM7/27/12
to User questions and discussions about OTRS.
It will reconnect every 10 messages until it has pulled them all.

Steve



xxx

unread,
Aug 1, 2012, 4:18:09 AM8/1/12
to User questions and discussions about OTRS.

I tracked the log of executing "otrs.PostMasterMailbox.pl -d 2 " , found that the script get 10 mails, then the script stops and until the next time cron job starts ,the script otrs.PostMasterMailbox.pl begin to receive next mails. 
POP3: Reconnect Session after 3 messages...
POP3: Connection to 192.168.10.18 closed.
Is this a bug ?
I am using OTRS 3.0.8 .

Thanks

Steven Carr

unread,
Aug 1, 2012, 6:11:33 AM8/1/12
to User questions and discussions about OTRS.
Well I'd advise upgrading to the latest version for your release (3.0.13) and then see if you still have the same issue, if you do then check http://bugs.otrs.org to see if it's logged.

Steve

Gerald Young

unread,
Aug 1, 2012, 8:38:59 AM8/1/12
to User questions and discussions about OTRS.
I'm trying to figure out why this matters, exactly. If you know the limitations, increase the batch size, especially if you expect > batch size number of tickets per fetch. On the other hand, if you expect 1000 tickets per fetch, and you're fetching every minute, that doesn't seem healthy. You should consider changing to procmail to handle the tickets immediately as they arrive.
Reply all
Reply to author
Forward
0 new messages