|04-09-2013, 05:58 PM||#1|
Join Date: May 2010
Device: IREX DR1000
Moving instead of copying ?
as most libraries are on the same partition, could calibre be programmed to move the files instead of copying and then deleting them ?
Last edited by Giuseppe Chillem; 04-09-2013 at 06:04 PM.
|04-09-2013, 11:48 PM||#2|
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Yes it COULD. But I don't think it should. It is safer to first copy all the files, then if successful, delete the original files. Then all or none are moved. I suspect this is intentional.
I prefer safety before speed, when it comes to how calibre manipulates files.
If you need speed, invest in faster disks and more memory for disk caches.
|04-11-2013, 11:23 PM||#3|
Join Date: Mar 2012
Location: Sydney Australia
A move within a POSIX compliant partition is a heck of a lot safer than a copy, because it involves a lot less I/O.
A move is a copy and delete of an inode within the directory structure rather than copying and deleting whole files. Many file systems (NTFS, HFS+ etc) give the directory structure extra safeguards to reduce the chance of corruption - such as pre-allocating disk space, using contiguous clusters etc.
And, on a POSIX compliant file system Calibre in fact does do moves (copy and delete inodes) when a book or author is renamed within a Library (directory). So why not do the same when a book is moved between two Libraries (directories) in the same partition.
IMO GC has made a valid suggestion - that is in fact safer.
|04-11-2013, 11:37 PM||#4|
creator of calibre
Join Date: Oct 2006
Location: Mumbai, India
No a move is not safer, the filesystem and the metadata.db database have to be kept in sync. That cannot be guaranteed with a move.
And calibre does not do a copy, it does a hardlink, then updates metadata.db and then a delete. That way the worst that can happen is you have extra files in your library, but metadata.db and the files can never be out of sync.
The only situation where calibre does a copy if is hardlinking fails because whatever filesystem you have your calibre library on is poorly implemented.
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Copying library||phantom_cyclist||Library Management||2||11-02-2012 06:13 AM|
|Error when copying.||Motomaggot||Calibre||6||07-09-2012 11:34 PM|
|copying from bookshelf to PC||lvd4||Fictionwise eBookwise||33||10-18-2010 06:51 PM|
|Feature Request: Moving and not copying when adding files...||Chuwiey||Calibre||7||07-03-2010 05:35 AM|
|Copying contents of SD||el.astrologo||Sony Reader Dev Corner||2||05-30-2009 09:56 AM|