Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 12-09-2015, 04:58 PM   #1
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Move Library : function and performance

I haven't moved a library for a long time

If a Library is moved via the calibre Switch/Create Library option should it 'disappear' from the old location - I just did a move where the old and new locations were on the same internal SATA3 NTFS drive - the library was copied from old to new and old wasn't deleted.

I 'expected' the operation to be done 'ctrl/x ctrl/v quick' - or am I misremembering.

I use Windows 10 64bit version 1511

BR

Last edited by BetterRed; 12-09-2015 at 05:01 PM. Reason: typo
BetterRed is offline   Reply With Quote
Old 12-09-2015, 06:26 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,782
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Was there any stragglers (non-calibre files) left over?
theducks is offline   Reply With Quote
Advert
Old 12-09-2015, 06:33 PM   #3
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
The expected behavior is that each individual file that calibre knows about will be moved, not copied.

So if all the files are copied something is wrong (file locking?) but if there are extra files and a folder structure left behind then that is expected.
eschwartz is offline   Reply With Quote
Old 12-09-2015, 07:14 PM   #4
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by theducks View Post
Was there any stragglers (non-calibre files) left over?
No, it was the entire library left behind, and it had a clean bill of health from Check Library. I retested with a freshly created empty library and the library folder with its metadata.db was left behind.

BR
BetterRed is offline   Reply With Quote
Old 12-09-2015, 07:48 PM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by eschwartz View Post
The expected behavior is that each individual file that calibre knows about will be moved, not copied.

So if all the files are copied something is wrong (file locking?)
The time taken to do the so-called 'move' (27 secs) is the approximately the same as File Explorer takes to 'copy' the same folder (24 secs) - a File Explorer 'move' is of course instantaneous

If files are locked calibre will normally thrown an error.

The contents of the old and now library folders are not symlinked, hardlinked or otherwise exotically associated.

I'll have to look up out how to get the file Object-Ids (fsutil I think) - if they're being copied they will be different, if they're being moved they'll be the same.

BR
BetterRed is offline   Reply With Quote
Advert
Old 12-09-2015, 09:31 PM   #6
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,160
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
fsutil file [quaeryfileid] <FileName>
PeterT is offline   Reply With Quote
Old 12-09-2015, 10:24 PM   #7
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by BetterRed View Post
I'll have to look up out how to get the file Object-Ids (fsutil I think) - if they're being copied they will be different, if they're being moved they'll be the same.BR
Well, I'm pretty sure the files are being copied and not moved

I made sure a couple of files in my test library had object ids before moving the library - the same files in the new location had no object id (object ids are only created when they're needed)

If I move files with File Explorer, xplorer2 or File Menu Utils the Object Ids are retained, if I copy the same files the Object Ids are not retained.

Also - the centre-screen blue progress bar flashes "Copied xxxx..." as it progresses

=================

If for some reason a library folder is deleted in the file manager (intentionally or inadvertently), then next time calibre starts it recreates the folder as an empty library without any warning.

I am almost certain it previously threw an message of some sort - I reset the confirmation dialogues to make sure it I hadn't hidden it.

===================

Peter I used "fsutil objectid query"

Code:
C:>fsutil objectid query "D:\CalibreLibraries\_Test\Kovid Goyal\DOCX Demo (185)\DOCX Demo - Kovid Goyal.docx"
Object ID :        f64aaebbac9ee5119cad0002721fc94a
BirthVolume ID :   1cfeae92c7d42d4cbe6eab8da2df5b55
BirthObjectId ID : f64aaebbac9ee5119cad0002721fc94a
Domain ID :        00000000000000000000000000000000

C:>
Thanks

BR
BetterRed is offline   Reply With Quote
Old 12-09-2015, 10:32 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
move library copies and then deletes after the copy operation succeeds. That is an operation mode that is far more tolerant to failures and works even if the destination is on another drive.
kovidgoyal is offline   Reply With Quote
Old 12-09-2015, 11:06 PM   #9
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
move library copies and then deletes after the copy operation succeeds. That is an operation mode that is far more tolerant to failures and works even if the destination is on another drive.
Point taken, that was what I suspected I could be misremembering - but my main issue is that it's not doing the deletion - i.e. the old library remains as was (although its no longer known to calibre) much like Remove Library operates. Is that intentional ?

BR
BetterRed is offline   Reply With Quote
Old 12-09-2015, 11:09 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Works for me. All I get left behind is the original folder with metadata_db_prefs_backup.json in it. All the actual books get moved. I should probably fix metadata_db_prefs_backup.json
kovidgoyal is offline   Reply With Quote
Old 12-09-2015, 11:40 PM   #11
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Works for me. All I get left behind is the original folder with metadata_db_prefs_backup.json in it. All the actual books get moved. I should probably fix metadata_db_prefs_backup.json
Yes I think it would be better to remove those files and the folder at the end of the move.

Should the deletes happen progressively as books are coped? I can set a task to monitor the filesystem operations on the library as its being moved.

The library folder that failed to delete anything would have had a disposition of Read Only (only the library folder not the contents) -- I wonder?

Aside : if some bright spark created shortcuts to their favourite books and then they moved their library, the shortcuts would be rendered irreparable; the repair service (Distributed Link Tracking) relies on the fact that files and folders will retain their Object Ids when they are renamed or moved within the same domain.

BR
BetterRed is offline   Reply With Quote
Old 12-09-2015, 11:43 PM   #12
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No, deleting happens after all copying has completed successfully, that way you are never left with a partially mangled library in case of unexpected failures.

The deleting code simply ignores failures, since they are not critical. So yes, something about the original library prevented it from being deleted.
kovidgoyal is offline   Reply With Quote
Old 12-10-2015, 12:20 AM   #13
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
No, deleting happens after all copying has completed successfully, that way you are never left with a partially mangled library in case of unexpected failures.

The deleting code simply ignores failures, since they are not critical. So yes, something about the original library prevented it from being deleted.
Speaking for myself - I would prefer to know via an end of 'task' message that calibre detected failures during the deletion phase. Otherwise I will be left wondering why the old library folder is still there. This is what I happened this morning - my initial 'problem' wasn't all the books as I assumed it was, just a goodly proportion of them -- I didn't run a diff across the two folders

I can't recreate the problem now - Indexing, Malware Detection, Compression, Defragging - they've all changed in Win 10, to some degree at least.

BR
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Library Size and Performance Hampshire Nanny Library Management 7 06-12-2014 09:10 AM
Performance issue with large library audeojude Calibre 25 12-07-2011 04:44 PM
How to move public library book from ADE to Sony Library? mom2three Sony Reader 3 06-30-2010 05:26 AM
Library size and performance MrFinch Calibre 4 01-01-2009 04:11 AM
Simple Script to move content to CF Card (works around WLAN - CF Performance Bug) torben iRex 0 12-03-2008 02:45 AM


All times are GMT -4. The time now is 05:11 PM.


MobileRead.com is a privately owned, operated and funded community.