Lost data during Sync

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
mommahawk
Bruji Friend
Bruji Friend
Posts: 14
Joined: Fri Jun 29, 2018 9:36 am

Lost data during Sync

Post by mommahawk »

Hi there. I run a private library and currently have 8700+ books in Bookpedia. I am trying to sync data from Pocketpedia to a computer (call it Mac 1) that I haven't run Bookpedia on in a while, as I was using a Mac (Mac 2) in another room. (I had tried syncing the two Macs through Dropbox for a while, but that was a nightmare and I lost all kinds of data, so I stopped connecting them to Dropbox and went to using only Mac 2.) Mac 2 went down in a power surge, so I wanted to bring in the data from my iPhone Pocketpedia app that had been recently synced to Mac 2. I opened the Bookpedia app, hit sync on my iphone...and lost all my updated data (over 1000 books!)--Bookpedia from Mac 1 overrode Pocketpedia info instead of mutually syncing, I guess. The only thing that came in from Pocketpedia to Bookpedia was 2 books that I had manually added directly into Pocketpedia. I'm trying to figure out what would be the best way to get the most updated info into Bookpedia on Mac 1, until I can get Mac 2 up and running again (if I can).
I have fairly updated Pocketpedia data on my iPad. I have somewhat recently backed up my iphone to Mac 1, so that's an option to use too. I also have a .csv file on my android phone, but I guess that wouldn't give me back all the covers?
Is there any way I can get back to the info on my iPhone before I synced it, as that was the most updated? 2nd most updated is my iPad Pocketpedia data.
Can you help me figure out the best way to get the most updated info onto my Mac 1 Bookpedia? Thank you!!
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Lost data during Sync

Post by Conor »

Thank you for all the details.

The Mac version of the programs are always the master database and will override the Pocketpedia database. Changes are synced backed, but are logged and hence not meant to be synced two different computers. Hence why we recommend Dropbox of iCloud drive for several computers.

To get your most recent data, do look at your data folder. This is in your home folder at ~/Library/Application Support/Bookpedia. Hold down the option key and click on the Finder "Go" menu and select "Library" to open your home library folder.

In there you will find a "Database.bookpd" file that is the most important file that has all the data. Since Pocketpedia had some data to sync there should also be a "Pocketpedia.bookpd" file. Without Bookpedia running, you can flip the names on this files so that "Pocketpedia.bookpd" becomes "Database.bookpd" and you might be able to load all the data from the iPad as it was. If this is the case you are set, you can then use the control click on the cover image well and "Download Cover" or "Book -> update from --> original site" to get any missing covers that would not have made it, as the "Database.bookpd" file is only the textual information.

If that file is not there and you want to pull the file from your iPad, it's best to hold down the option key and click on the "Help" menu in Bookpedia. There will be a debug "Pocketpedia" menu, select that and then the "backup" button. Then when you sync it will copy the entire database file from Pocketpedia and you can make the flip like above to install in on your Mac. This way you are doing the change deliberately and not relying on the automatic sync that is smart and only does changes since the last sync data as it assumes it's being synced with a single Mac and iOS device.

Hopefully that will get you up to date while the other Mac is revived. Good luck with the repair.
mommahawk
Bruji Friend
Bruji Friend
Posts: 14
Joined: Fri Jun 29, 2018 9:36 am

Re: Lost data during Sync

Post by mommahawk »

Great, thanks. I was able to switch the names and get the most updated file on Bookpedia, but of course, it's only the text. Is there any way to get the covers from the iPhone or iPad Pocketpedia backup on iTunes into Bookpedia? We have lots of older books that we have had to take pictures of ourselves (thousands!), that either Amazon did not have the right image or no image at all. I also have the Covers folder on my Mac that I assume is from the original, older Bookpedia database? That would be another great option if there was a way to repopulate Bookpedia with that Covers file. I don't want to mess around with anything trying to get it to work...
I've been searching the forum, but haven't quite found exactly my problem.
Thanks so much.
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Lost data during Sync

Post by Conor »

Pocketpedia assumes that the Mac has all the info for the books that came from the Mac. Since the cover there is of better resolution, it gets downgraded depending on the iOS device to save space. Getting covers from online is easy, but as you mention custom covers is more complicated.

If you have a "Covers" folder that has all the covers from the original database, you can place it as the "Covers" folder in the data folder, where the data file is. The covers are simply read by their unique ID from inside that folder. So renaming the existing folder and copying the one from the other Mac should bring in the covers. (Do rename the folder and you are not losing data, as you can always reverse the procedure to go back to the previous covers). When you launch Bookpedia you can then check the covers to make sure they are from the same database and they match their books.

I am reworking the sync for a future version to make it more asynchronous so that it does not care what way the data is flowing and will be easier for users to recover from Pocketpedia as a backup. But that will take a while, as it's a harder to do right than having the Mac be the master database.

Kind regards,
Conor
mommahawk
Bruji Friend
Bruji Friend
Posts: 14
Joined: Fri Jun 29, 2018 9:36 am

Re: Lost data during Sync

Post by mommahawk »

I decided to just try to redownload covers from the internet, and it didn't work. For the ones that are coming up with covers, they are wrong. Does it have something to do with the current Covers folder not matching up with the database? Does redownloading them not override the Covers folder that was already there?
Also, the path is to the correct folder. And if I try to download just one cover, it doesn't change to the right one.
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Lost data during Sync

Post by Conor »

Bookpedia won't delete data, including the covers. Hence after doing a selection you have to use "Book -> Remove Cover" menu command to remove the cover. Then you can do "Book -> Update from -> Doghouse (or other site)".

Once you get everything in order, to really clean out covers that have nothing to do with this database, hold down the option key and click on the "Help" menu, some debug options will come up. Use the "Remove Orphaned Covers", it will delete all covers that don't belong to an entry in Bookpedia.
Post Reply