![]() |
#1 | ||
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Jul 2012
Device: iPad, Kindle Fire, Kindle PW, Nook ST
|
metadata.opf question
I never really paid attention to the metadata.opf files until I started using a weekly automated program to create a mirrored back-up copy of my library.
I have noticed every week now 1000's of books I know I haven't opened, read, edited or changed metadata on were being reported by the software I use as being in need of updating as they had changed. I used UltraCompare today to take a peek inside several of the files to see exactly what was being changed and it appears it is only Quote:
Quote:
I am also wondering why calibre appears to only update some books in this fashion. |
||
![]() |
![]() |
![]() |
#2 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
How do you intend on excluding them in an automated manner??
If your backup program is any good (and most are ![]() |
![]() |
![]() |
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
|
![]() |
![]() |
![]() |
#4 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
A tag was edited most likely, depending on where this (and other actions) was done, this will cause all books sharing that metadata to be backed up. Nothing *changed* except for the timestamp usually, and apparently a new piece of info calibre decided to store by default in the OPF, which was not previously present and thus had to be added.
|
![]() |
![]() |
![]() |
#5 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,913
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
The (backup) OPF does get rewritten because Tags are stored in clear text. OPF files are small |
|
![]() |
![]() |
![]() |
#6 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,634
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@robin58 - Strange, I would have thought the two lines quoted would have been amongst those least likely to change.
But why are the files changing? There are things that change the book metadata that are not immediately obvious, such as - adding, changing (the definition) and removing custom columns; changing the case or spelling of an author, publisher, series, tag value etc, The opf files are there so that the calibre database (metadata.db) can be rebuilt if and when necessary. If you don't back them up, then in the event of a disaster you may not be able to rebuild your library... easily. You may have to add all the books again... that should fairly easy. You may have to put the metadata back together again... that might be hard if it was created manually and it includes custom columns that are not stored in the books formal metadata. I add a belt to my backup braces - all the metadata is in the ePUB's book jacket. How frequently do you do the backup ? What software do you use? And when you say 'online backup' does that mean over a local network, or over a wide area network? BR Last edited by BetterRed; 02-14-2014 at 04:35 PM. |
![]() |
![]() |
![]() |
#7 | ||||
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Jul 2012
Device: iPad, Kindle Fire, Kindle PW, Nook ST
|
Quote:
Quote:
Quote:
Quote:
I understand they're an important factor in restoring should something become corrupt, but unless I'm missing something if the version number of Calibre is going to prevent an accurate restoration, then having a backup is useless anyways, right? As for frequency, I back it up once a week to a networked drive which then is also mirrored on an online storage as it is a watched folder. |
||||
![]() |
![]() |
![]() |
#8 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
The problem isn't a lack of the appropriate version number as a contributor... If you exclude the OPF from being backed up, then it ... isn't ... backed up!
|
![]() |
![]() |
![]() |
#9 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,634
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@robin58 - I use Goodsynch, matter of fact I just d/l latest version (9.7.9), and I'm using calibre 1.24
The calibre version number in the dc:contributor entries in my opf's appears to reflect the version number when metadata was last changed. Many of them have 0.9.nn in there, some might even have 0.8.nn. 'Tis a pity that there is no option to display the Library metadata backup status counter in the status line, then one could see them being written. You might be able to hear them being written - on my rig when there's a bulk change of opf's happening they are written at about 1 per 2 sec, so the drive sounds like a slow ticking... clock. Maybe the file system modified timestamp on the opf files can give you a clue as to when they're being written. Its my understanding that Kovid has not changed the database schema for a number of years, I assume he hasn't changed the opf schema for a similar time. BR Last edited by BetterRed; 02-14-2014 at 08:00 PM. |
![]() |
![]() |
![]() |
#10 | ||
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Jul 2012
Device: iPad, Kindle Fire, Kindle PW, Nook ST
|
@eschwartz,
I think you're missing my point. If I have backups and the only difference is the version number inside as detailed above, then surely that wouldn't prevent a restoration? Would it? @BetterRed, After my above post I went and ran FreeFileSync again. Now bear in mind I haven't even opened Calibre since earlier. The differences speak for themselves. First screenshot is the capture of all the files reporting different opf file sizes. Second screenshot is the comparison using UltraCompare set to only show differences between the 2 files (again this is just one file but in checking a dozen they're all the same differences). Other than the same 2 lines as above, there is a reference to the cover.jpg file in which for some reason has Quote:
Quote:
![]() ![]() Last edited by robin58; 02-14-2014 at 05:31 PM. |
||
![]() |
![]() |
![]() |
#11 | ||||
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
And your restore will fail to take this into account, which is somewhat contrary to the purpose of having a backup, if you ask me. You will of course have the actual ebook files, but I doubt you'd enjoy redoing all your metadata. This assumes that something catastrophic happens to your db, but that's no less likely than something catastrophic happening to your hard drive. Since the OPF is quite small, and your sync program can probably handle uploading only the changes, why not just let it sync too? Quote:
Last edited by eschwartz; 02-14-2014 at 05:43 PM. |
||||
![]() |
![]() |
![]() |
#12 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,634
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@robin58 - you can look inside the opf files with a text editor - its rebadged xml.
I have this at the end of all my opf's - even if there is no cover Code:
<guide> <reference href="cover.jpg" title="Cover" type="cover"/> </guide> BR Last edited by BetterRed; 02-14-2014 at 05:48 PM. |
![]() |
![]() |
![]() |
#13 | |||
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,634
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
If one or both of them change the archive attribute then maybe the other one sees that on the next go round. Also are you doing two way synchs, or one way copies. Quote:
Quote:
BTW: my screen shot comes from the Browse Flat feature of xplorer2, couldn't live without it - there's a free Lite version that does Browse Flat BR Last edited by BetterRed; 02-14-2014 at 08:39 PM. |
|||
![]() |
![]() |
![]() |
#14 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
I am a regular user of freefilesync - in one -way ( mirror) mode. it backs up my calibre library & also my calibre app folder to a different hard drive
I have not noticed the issue under discussion. a typical backup finds only a few changed files which seems to equate to recent adds, deletes & edits. I dont think it is re-copying hundreds of opf files PS I am using the last v5 of FFS, the UI for v6 looked very strange so I rolled back & disabled update notifications update; tying harder to replicate this. I ran my FSS mirror ( which writes to 2 separate backup locations ) there were ~100 changes then I closed calibre & re-ran FFS compare , just a handful of changes detected: to metadata.db & related files re-opened calibre, ran FFS compare again - same result there are 2 compare settings in ffs, I use compare filze size & data. it could be that using compare content gives a different result? I. Compare by File time and size This variant considers two files with the same name as equal when both modification time and file size match. The following categories are distinguished: file exists on one side only left only right only file exists on both sides different date left newer right newer same date equal conflict (same date, different size) II. Compare by File content Two files with the same name are marked as equal if and only if they have the same content. This option is more useful for consistency checks rather than backup operations since it is naturally slower. The file modification time is not taken into account at all. Last edited by cybmole; 02-15-2014 at 08:14 AM. |
![]() |
![]() |
![]() |
#15 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,634
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@cybmole - does FFS use, set or or reset any attributes. Goodsynch can take their values into account in its comparisons? I ask because the OP appears to be using both.
@robin28 Are you using the latest versions of Goodsynch (GS) and FFS, and are you using the 'free' or 'paid' version of GS. I use 'paid' because it has features I want (not for calibre libraries) that aren't available from 'free'. I wonder if those results from UltraCompare can be 'trusted', to me they don't make any sense. Yesterday I noticed that GS has the ability to override the text content compare engine, the default is the UNIX 'diff' engine. If you have you 'plugged' UltraCompare into GS (and/or FFS) as the text compare engine, then I suggest you take it out - 'diff' may not be the fastest compare utility on the planet, but not many would doubt its efficacy. Assuming file is present on both sides, I have GS configured to compare file mod date, size and MD5 checksum to decide if file has changed, I don't compare content. BR |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change opf filename from content.opf to title.opf | northstar7 | Sigil | 3 | 09-23-2013 12:44 PM |
[Old Thread] metadata.opf ? | cybmole | Calibre | 12 | 02-01-2012 02:00 AM |
OPF metadata for dc:author | miwie | Recipes | 3 | 11-24-2010 02:06 AM |
What is metadata.opf | jla888 | Calibre | 5 | 10-14-2010 05:46 PM |
Mobigen opf metadata | tibiafry | Kindle Formats | 2 | 04-15-2009 04:07 AM |