Hi,I was working with this distribution:- Windows Server 2008 R2- IIS 7.5- PHP 5.6- MariaDB 5.5: InnoDB- Osticket 1.9Last week our HD crash and in that moment we discovered that backups wasn't doing OK :( So we haven't a dump from DB (snif). We sent our HD to experts and they could recovery a lot of information, but now the DB seems corrupted. I have tried for a two days repair but I'm not an expert of mysql.I have been able to diagnose that the tables: file_chuk, emails and threads are crashed. I can view my Osticket with my web explorer but i can't do anything because inmediatly the mysql service go down.So, I have decided that best option is begin from zero. I want to install a new version from Osticket without no data and try to recovery something, whatever, the knowledge base for to tell one of these, or our clients info.How can I get it? What have I do?

This sounds like a horrible experience.I'm not sure that you will be able to recover this easily.  If you can use mysql to export the db you might be able to look at those tables and manually edit and fix the data (its plain text), but that doesn't sound like a fun experience depending on how many rows those tables have.You could setup a test site.  Install the latest (or the same version you were running) and add some sample data so that you can look at the two files side by side to fix it.You can download osTicket from: osticket.com/downloads

Hi ntozier,Thanks for your help.Yes, it's not a nice experience...It's not possible to export the db because when the process arrives to table corrupted the mysql service go down and the process is stoped.How can I add "some sample data". I think that tables have foreign keys between their and if you don't import the complete data you will crash de db. Is not right?I like to import only the tables that are ok in a new installation but if i do this i think that db will not work.Apologizes for my english! Best Regards from Barcelona ;)

If you cannot export the data to edit it, then I dont think that there is much that we can do. You can save your users if you can import:ost_userost_user_accountost_user_emailYou can save your staff if you can import:ost_staffost_staff_dept_accessYou casn save your os?Ticket configuration if you can import:ost_config(note: ost_ is the default db prefix, if you used a custom one your tables would have that ###_ prefix instead)

Sorry, but maybe I have not explained right.From HeidiSQL i can export data without select the 3 tables corrupted.But, What can I do with a DB without 3 tables?

New news.I have dumped the db without the 3 bigger tables that they send me an sql error:- ost2_file_chunk- ost2_ticket_email_info    - ost2_ticket_threadBut if I want to see the data from this tables I can it, except for File_chunk. Maybe I could copy the data directly from heidisql with a copy-paste to csv?Will I can import this db dumped to a new db from a new osticket and to work with this? Maybe will I have a new errors because the keys doesn't find the data from db corrupted?Thanks in advance.

It shouldn't be to much work getting a new osticket install going on top of a old database, the only issue i see is the ticket_thread table is quite important.As for the export and import, it should work but i'd look for another option other than csv.

Hi Micke!Thanks for your support!!I was able to export to a sql insert file the last 900 rows with this query:select * from ticket_threadorder by id desc limit 900The query crash when put limit 1000.Aprox the same for email_info.Do you think that this could be enought for to get a new osticket with some information from old db?

SInce it's a 1.9 install and not a 1.10, i'm not 100% sure what is stored in the ticket_thread table and thus it's going to be difficult to tell you what will break.Judging by the tables that you're missing it'll most likely just break when you're actually trying to view the tickets, and that can probably be resolved for the 900 tickets you've managed to retrieve.Out of curiousity, what happens if you try to do limit 901, 1000?

I think that some record could be corrupted so. When I change the limit and show this record the mysql service go down.Just now I'm trying to recovery this "partial db"... cross fingers.

I did it!! That's crazy!!First checking wich tables was corrupted. Then exporting the other tables was done.I installed a new osticket (same version) and I created a database with same settings. I imported the db but some tables was missing. So, I had to do a lot of "selects" in the corrupted bd trying to get the most registers as I can, and then I created an insert sql file. When I did a select from corrupted field I must restart mysql service and try again by next register not corrupted.Finally, step by step, I could recovery 21000 of 22000 registers from thread table. And insert to the new db. I'm very very happy.Thank you so much for Micke and specially for ntozier. Without you weren't be possible.Apologizes for my english.

Sorry i didn't respond for a bit, I went to FL for my Birthday and was busy vacationing. :)  However I'm glad that now I'm back to see that you ahve managed to get thins working.

Don't worry ntozier. Your support is free and I haven't reason for impose you an answer ;)Happy birthday!!

Write a Reply...