¿Truncate and backup Database?
Moderator: crythias
¿Truncate and backup Database?
Hello Everybody!
I want to divide my OTRS database by different years. One DB for 2008, another for 2009, another for 2010 and another for 2011 and 2102.
I want to use the 2008, 2009 and 2010 databases only for read. This database will go to a new server each. The another database will be the production DB.
How can I do that?
Thanks in advance!
I want to divide my OTRS database by different years. One DB for 2008, another for 2009, another for 2010 and another for 2011 and 2102.
I want to use the 2008, 2009 and 2010 databases only for read. This database will go to a new server each. The another database will be the production DB.
How can I do that?
Thanks in advance!
Re: ¿Truncate and backup Database?
not possible in OTRS
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: ¿Truncate and backup Database?
There is a possibility to delete tickets given a range via Generic Agent, though.
You should definitely positively be sure you have a good, tested, restorable backup, but you could do this:
Load the backup file in another database.
Delete from this database tickets in the range you do not want via Generic Agent
Export the resultant database as yearx.
Lather, rinse, repeat.
You should definitely positively be sure you have a good, tested, restorable backup, but you could do this:
Load the backup file in another database.
Delete from this database tickets in the range you do not want via Generic Agent
Export the resultant database as yearx.
Lather, rinse, repeat.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: ¿Truncate and backup Database?
Great idea, I will be testing that.crythias wrote:There is a possibility to delete tickets given a range via Generic Agent, though.
You should definitely positively be sure you have a good, tested, restorable backup, but you could do this:
Load the backup file in another database.
Delete from this database tickets in the range you do not want via Generic Agent
Export the resultant database as yearx.
Lather, rinse, repeat.
Thank you!
Re: ¿Truncate and backup Database?
Hello everybody.
I'm having problems restoring the backups. I can't find the exact procedure to restore the backup and not get any good result. This is not good for us. I tried this without success:
Try 1:
. Installed OTRS on a new Server (same OS than the original and same OTRS version).
. Copy OTRS backup files in folders: Apache, CronW, OTRS, OTRS4Win and StrawberryPerl.
. Restored MySQL Database from a big .SQL file using SQLYog.
Try 2:
. Installed OTRS on a new Server (same OS than the original and same OTRS version).
. Copy OTRS Backup files in folders: Apache, CronW, OTRS, OTRS4Win and StrawberryPerl.
. Installed opm packages in the new server. The packages were downloaded from the package manager of the original server.
. Restored MySQL Database from a big .SQL file using SQLYog.
Anybody have any kind of help?
Thanks in advance.-
I'm having problems restoring the backups. I can't find the exact procedure to restore the backup and not get any good result. This is not good for us. I tried this without success:
Try 1:
. Installed OTRS on a new Server (same OS than the original and same OTRS version).
. Copy OTRS backup files in folders: Apache, CronW, OTRS, OTRS4Win and StrawberryPerl.
. Restored MySQL Database from a big .SQL file using SQLYog.
Try 2:
. Installed OTRS on a new Server (same OS than the original and same OTRS version).
. Copy OTRS Backup files in folders: Apache, CronW, OTRS, OTRS4Win and StrawberryPerl.
. Installed opm packages in the new server. The packages were downloaded from the package manager of the original server.
. Restored MySQL Database from a big .SQL file using SQLYog.
Anybody have any kind of help?
Thanks in advance.-
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: ¿Truncate and backup Database?
How do you expect to receive assistance if we don't know how to translate "not get any good result"?AVillar wrote:not get any good result
What level of "It doesn't work" do you need assistance?
does sqlyog indicate that the import worked?
Is there data in the article and ticket tables?
Does the website show up?
Are there errors in logs?
Are you missing permissions?
We can't help you with generic "it doesn't work right" problems. Our crystal 8-ball says, "It should work. Try something else."
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: ¿Truncate and backup Database?
Hello Crythias. How are you? I hope you are all right.crythias wrote:How do you expect to receive assistance if we don't know how to translate "not get any good result"?AVillar wrote:not get any good result
What level of "It doesn't work" do you need assistance?
does sqlyog indicate that the import worked?
Is there data in the article and ticket tables?
Does the website show up?
Are there errors in logs?
Are you missing permissions?
We can't help you with generic "it doesn't work right" problems. Our crystal 8-ball says, "It should work. Try something else."
When I say 'not get any good result' I'm telling that after restoring backup 'nothing was restored from backup'. There is no tickets, no agents, no customers, nothing. I check the database tables and everything looks ok, every table have their respective data just like the production server.
The website runs ok. If not, I can't install the OPM packages (I'm sorry, but I think this was obvious).
I guess I'm forgotten something really stupid and simple, It's very strange for me.
I have some errors in the log, But were solved after reinstalling the packages. There are another errors like 'Can't get file from' because the new server don't have internet connection. If I upload the log file can help you?
Thanks in advance, again.-
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: ¿Truncate and backup Database?
This sounds like Config.pm isn't pointing to the same database to which you restored. There might be other issues, but if the tables look okay, then this seems to be you're not looking at the same database.AVillar wrote:There is no tickets, no agents, no customers, nothing. I check the database tables and everything looks ok, every table have their respective data just like the production server.
"But I am"
Then I don't know what to say. If you're using sqlyog or MySQL Workbench or phpMyAdmin and you see articles and tickets then they should show up in OTRS. The possibility exists that for some reason you're an agent that has no access to the groups/queues to which the tickets are assigned.
"But I am"
Then the logs would tell you that it can't find ... something.
"But there are no logs"
Then you're connecting to the wrong database.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: ¿Truncate and backup Database?
did you delete also all caches?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Re: ¿Truncate and backup Database?
A little update:
After restored the backup (with Apache and CronW services stopped), the ticket table is full. After start both services, the table ticket left empty. And get this error on the log file:
[Wed Jan 16 16:20:01 2013][Error][Kernel::System::DB::new][181] Host 'servername' is not allowed to connect to this MySQL server
But the otrs.checkdb.pl says 'it looks Ok!'.
What is going on?
After restored the backup (with Apache and CronW services stopped), the ticket table is full. After start both services, the table ticket left empty. And get this error on the log file:
[Wed Jan 16 16:20:01 2013][Error][Kernel::System::DB::new][181] Host 'servername' is not allowed to connect to this MySQL server
But the otrs.checkdb.pl says 'it looks Ok!'.
What is going on?
Re: ¿Truncate and backup Database?
is the database on the same host or on a different one?
If on the same host: check Config.pm as it miht point to the wrong one
If on other host: change user permissions for this database user, so you can connect
If on the same host: check Config.pm as it miht point to the wrong one
If on other host: change user permissions for this database user, so you can connect
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Re: ¿Truncate and backup Database?
I can connect to to the DB with sqlYog using the config.pm credentials. Also, I tested the connection with OTRS\OTRS\bin\otrs.checkdb.pl and everything looks OK. Is otrs.checkdb.pl using the same credentials that in config.pm?
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: ¿Truncate and backup Database?
It should.AVillar wrote:Is otrs.checkdb.pl using the same credentials that in config.pm?
Are you trying to run installer or just log in? It won't delete the tables just to start services.AVillar wrote:the table ticket left empty
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: ¿Truncate and backup Database?
After start both services, the table ticket left empty. The last procedure (explained) was:crythias wrote: Are you trying to run installer or just log in? It won't delete the tables just to start services.
. Installed OTRS on a new Server (same OS than the original and same OTRS version).
. Stop Apache and CronW Services.
. Copy OTRS Backup files in folders: Apache, CronW, OTRS, OTRS4Win and StrawberryPerl.
. Start Apache and CronW Services.
. Installed opm packages in the new server. The packages were downloaded from the package manager of the original server.
. Stop Apache and CronW Services.
. Restored MySQL Database from a big .SQL file using SQLYog.
. Ticket, users and article table looks intact.
. Start Apache and CronW Services.
. Ticket table is empty, users table only have root@localhost user, article table looks intact.
What is going on?
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: ¿Truncate and backup Database?
do not know. disable config.pm's database password and see if it happens again.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: ¿Truncate and backup Database?
Problem solved. It was between SQLyog and MySQL.
Testing Generic Agent options Now.
Thanks a lot!
Testing Generic Agent options Now.
Thanks a lot!