12-09-2015, 04:58 PM | #1 |
null operator (he/him)
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 |
12-09-2015, 06:26 PM | #2 |
Well trained by Cats
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?
|
Advert | |
|
12-09-2015, 06:33 PM | #3 |
Ex-Helpdesk Junkie
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. |
12-09-2015, 07:14 PM | #4 |
null operator (he/him)
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
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 |
12-09-2015, 07:48 PM | #5 | |
null operator (he/him)
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
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 |
|
Advert | |
|
12-09-2015, 09:31 PM | #6 |
Grand Sorcerer
Posts: 12,160
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
fsutil file [quaeryfileid] <FileName>
|
12-09-2015, 10:24 PM | #7 | |
null operator (he/him)
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
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:> BR |
|
12-09-2015, 10:32 PM | #8 |
creator of calibre
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.
|
12-09-2015, 11:06 PM | #9 | |
null operator (he/him)
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
12-09-2015, 11:09 PM | #10 |
creator of calibre
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
|
12-09-2015, 11:40 PM | #11 | |
null operator (he/him)
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
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 |
|
12-09-2015, 11:43 PM | #12 |
creator of calibre
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. |
12-10-2015, 12:20 AM | #13 | |
null operator (he/him)
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
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 |
|
|
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 |