|04-09-2013, 06: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 07:04 PM.
|04-10-2013, 12:48 AM||#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-12-2013, 12:23 AM||#3|
Join Date: Mar 2012
Location: NSW 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-12-2013, 12:37 AM||#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 07:13 AM|
|Error when copying.||Motomaggot||Calibre||6||07-10-2012 12:34 AM|
|copying from bookshelf to PC||lvd4||Fictionwise eBookwise||33||10-18-2010 07:51 PM|
|Feature Request: Moving and not copying when adding files...||Chuwiey||Calibre||7||07-03-2010 06:35 AM|
|Copying contents of SD||el.astrologo||Sony Reader Dev Corner||2||05-30-2009 10:56 AM|