Help Can I Undo the Overwrite of My Database Using 'Restore Database' Command

senmu

Member
In my attempt to Backup my Database and send it from my phone via email to my computer, I got confused looking over the various Pleco files listed. I may have used the 'Restore Database' command because afterwards my flashcards reverted back to the collection I had a year ago. This is a tragic loss of cards each manually entered.

Is there any way to find my lost cards? I hoping there are a series of backedup databases I can choose from to get the one I need. I went to the manual and seem to read that below. How do I find my old, but most accurate database?

"Please note that this will overwrite your current flashcards database, deleting any cards that are already in it, and that the backup file you restore from is copied to another location on your device before it's used by Pleco. The old copy will still be around, but it won't be updated -"
 

mikelove

皇帝
Staff member
The "old copy" that text is referencing is actually the backup database that you restored from, not the database that you replaced.

However, we've designed the system to make it very difficult to restore a database by accident - you have to click through two different alerts warning you that you're going to overwrite your flashcards. Are you sure that you actually used that command? If it simply looks like you have your cards from a year ago then there could be other reasons for that - for example, the folder Pleco was storing its data files in might have become inaccessible and it might have found an older folder with a different version of its flashcards in it. Do you have an add-on SD card in your phone? What model of phone is it and what version of Android is it running?
 

gato

状元
I see that the heading on the Restore screen is just "Documents" and nothing to indicate it's the restore function. That's probably a confusing point.
 

mikelove

皇帝
Staff member
Where? The only header should be the file browser header, which I don't believe has a title at all - just the name of your current directory.
 

gato

状元
Is "Documents" at the top of screen a folder name? Is it possible to replace it with "Restore"? I am using iOS.
 

senmu

Member
Perhaps you're right and that is what happened. I have an LG-E975 bought and used in Taiwan. I'm running Android 4.1.2. I don't have an SD card but have plenty of storage 25 GB total. Sorry, I'm heading out the door now and will be back home in 8 hrs. What can I do next?
 

mikelove

皇帝
Staff member
The lack of an SD card mostly eliminates the old database explanation, unfortunately. Do you remember any more details about what you might have done that caused your flashcards to revert?
 

senmu

Member
So it was unclear to me how to back up my database. I wanted to send it via email, so I went to flashcards then i went to 'Backup Database' i saw Restore Database but i knew i didn't want to do that. Once i pressed 'Backup' it took me to a black screen with listings of several Pleco files.Currently I see 5 files there a
'flash.xml' and flashbackup.pqb' and 'Pleco flashcard Database' the latter has 0 bytes which sees odd. the flash xml is dated Mar 14, and the flashbackup.pqb is dated Mar 23. Is there some way I can export these and after saving them elsewhere try importing them to see if they are any different than my current flashcards?

Originally I was confused by the lack of menu commands for backing up and so went to restore database to see what was there. But I don't remember what happened there. I'm thinking if i was warned it would overwrite i wouldn't do that.
What do you suggest I try?
 

mikelove

皇帝
Staff member
Those don't need to be exported, actually, you can go right ahead and try importing them - for flashbackup.pqb you'd want to use "Restore Database," for flash.xml you'd want to use "Import Cards."

We're streamlining this in our next update along the lines of how it works on iOS, putting the backup/restore and import/export commands in a popup menu in the sidebar to (hopefully) improve their discoverability.
 

senmu

Member
OK Mike, I tried restore Database' for the pqb and got an error message saying "It is not safe to copy your flashcardf file to Pleco's database directory before restoring it instead move it to another location and restore it from there" Does that tell us anything significant? Shall I go ahead and do that?
 

mikelove

皇帝
Staff member
Sorry, what directory is flashbackup.pqb in? Move it to your SD card's root directory and try restoring it again from there - /Android/data/com.pleco.chinesesystem/files/databases is where we store your active flashcard database and to prevent file corruption we don't let you restore any other databases from there (as they could end up overwriting themselves).
 

senmu

Member
OK it already is in that file path earlier when I got that error message. It won't let me restore from there. Do I move the the flashbackup.pqb elsewhere or try restoring the XML file?
 

senmu

Member
OK, I did that and the restore command worked, but the file it restored didn't have the true recent version with my flashcards. So I'm still stuck with my flashcard collection from a year ago! I searched *.pqb and didn't find anything else on my computer or phone. Seems I didn't back it up frequently and so I somehow confused backup with restore commands I guess. Moving forward can I send the Pleco database exported file from my phone via email, dropbox etc? Seems a hassle to actually have to pull out a cable to connect it to my computer.
 

mikelove

皇帝
Staff member
Very sorry about that.

Yes, you can email the backup file to yourself or copy it to Dropbox / Google Drive / etc. If you have a .zip file utility (or can download one) then it's best to .zip the backup file before you transfer it, since it's less likely to get corrupted (by a buggy e-mail client, say) that way.
 
Top