02-09-2024, 01:37 PM | #1 |
Addict
Posts: 352
Karma: 6312188
Join Date: Apr 2019
Device: Kobo Sage, Kobo Clara HD, Galaxy Tab S5e, Kindle 4th Gen
|
Can I rsync my library?
My laptop was my daily driver for 7ish years, then about six months back I finally built a proper new desktop tower. I did a one-time export of my Calibre configs and libraries over to the new desktop with the assumption that it would become my daily driver, but for various reasons it continues to be my laptop. Now the library is out of sync again.
Both the laptop and the PC are running Linux. Can I safely rsync the Calibre Library directory between the two endpoints directly? This would be easier than my current method of using a flash-drive go-between (e.g. rsyncing from laptop -> flash drive, then flash-drive -> desktop). I had heard it was a bad idea to try to rsync across different OS's, but if they're both Linux, I'm assuming it should be fine? |
02-09-2024, 02:13 PM | #2 |
the rook, bossing Never.
Posts: 12,249
Karma: 89531599
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
It seems fine doing a one-way rysnc, But I only change stuff on one Linux box. Also I use a preset settings via grsync that only overwrites old files and never removes anything.
You may end up with extra caltrash, or extra stuff, so occasionally I do an export, copy that to server, delete calibre library on server and laptop and then (g)rysnc. The export is then an archive. I might delete an archives export after a new one is made. Keep both Linux and Calibre at same revision. I do also have a test linux box and a VM with Win10 (but only a few ebooks on that) out of curiosity. I use my workstation which has a 4K screen and UPS. I rsync to a server. I rsync from that to a laptop if I'm going out somewhere, and then I don't change anything on Calibre. I might edit or write LO Writer or plain text when out, and then manually copy via lan back to workstation. I also do backups using Timeshift and direct copies to Ext4 USB HDD. |
Advert | |
|
02-09-2024, 02:25 PM | #3 |
Addict
Posts: 352
Karma: 6312188
Join Date: Apr 2019
Device: Kobo Sage, Kobo Clara HD, Galaxy Tab S5e, Kindle 4th Gen
|
Looking at screenshots of grsync--does it have the ability to do a verbose dry-run before running like the cmdline does?
|
02-09-2024, 06:57 PM | #4 |
Resident Curmudgeon
Posts: 75,824
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
FreeFileSync works very well and can do a one way sync. It's very easy to use. There is a Linux version.
Given that both are Linux, it will be fine. https://freefilesync.org |
02-09-2024, 06:58 PM | #5 |
Resident Curmudgeon
Posts: 75,824
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
Advert | |
|
02-11-2024, 07:54 AM | #6 |
the rook, bossing Never.
Posts: 12,249
Karma: 89531599
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
|
04-28-2024, 08:58 PM | #7 |
Addict
Posts: 352
Karma: 6312188
Join Date: Apr 2019
Device: Kobo Sage, Kobo Clara HD, Galaxy Tab S5e, Kindle 4th Gen
|
Just to confirm: which file is the Calibre database itself? Is it the metadata.db file? Is there anything else I need to copy over?
I installed grsync and did the laptop->flash drive->computer sync, and could see that it mostly moved only new books since my last export/restore (along with a bunch of metadata files in the ebook folders, and inexplicably some EPUBs that are very old--dunno if the folder name changed or if rsync detected some file corruption, or what). But Calibre itself is not showing any of the new books. I opened the metadata.db file in a sqlite browser and I can see none of the new books are in the data table, so I'm assuming that file failed to copy over for some reason. |
04-28-2024, 08:59 PM | #8 |
Custom User Title
Posts: 9,259
Karma: 63194753
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
metadata.db is the database, yes.
|
04-28-2024, 09:30 PM | #9 |
Well trained by Cats
Posts: 30,355
Karma: 58032210
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
The whole folder is The Library.
It is a Hybrid. The DB MUST be in lockstep with those other files. Those names and (ID) are stored in the DB. That is why the rule about messing under the skirt as even the tiniest change can break the linkage. Incremental (mirror) backups, copy all changed items (the files along with the DB) |
04-28-2024, 09:55 PM | #10 | |
Zealot
Posts: 105
Karma: 1133068
Join Date: Sep 2007
Device: ipaq
|
Quote:
The library is the folder that contains metadata.db and any other files in that folder and all subfolders and all files under that folder. |
|
04-28-2024, 09:59 PM | #11 |
Zealot
Posts: 105
Karma: 1133068
Join Date: Sep 2007
Device: ipaq
|
No, not at all. metadata.db is *a* database, but it is not *the* calibre database. The calibre db is all the folders and subfolders and all the files, starting from the folder containing metadata.db. THAT is the calibre db. All of it.
|
04-28-2024, 10:17 PM | #12 |
Custom User Title
Posts: 9,259
Karma: 63194753
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Not necessarily. The CALIBRE_OVERRIDE_DATABASE_PATH environment variable allows for having the metadata.db in a separate location than the library files.
|
04-28-2024, 10:24 PM | #13 | |
Zealot
Posts: 105
Karma: 1133068
Join Date: Sep 2007
Device: ipaq
|
Quote:
But the point remains. The library is part of the complete database. If you move files around inside those folders, the metadata.db will no longer match. So both the metadata.db and all the "library" files need to be from the same point in time. Simplest to just treat them *all* as "the database". |
|
04-28-2024, 11:35 PM | #14 |
null operator (he/him)
Posts: 20,919
Karma: 27620686
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
We don't refer to a bricks and mortar library as a catalogue or card index. If you asked me about a calibre 'database', I might ask which 'database'?
All calibre libraries have at least two files which are regarded as 'databases' -- metadata.db and .calnotes.notes.db, and some libraries can have another two -- full-text-search.db and metadata_pre_restore.db. Added: Dataset would be a good word to refer to a calibre library in the abstract. BR Last edited by BetterRed; 04-29-2024 at 12:20 AM. |
04-29-2024, 12:31 AM | #15 |
Wizard
Posts: 1,778
Karma: 26050790
Join Date: Sep 2017
Device: PW3, Fire HD8 Gen7, Moto G7, Sansa Clip v2, Ruizu X26
|
I rsync my Calibre installation to a remote computer a couple times a day. Been doing this for years. Never ever had a problem, even when I accidentally left Calibre running on the source machine.
My specific set up:
|
Tags |
linux, rsync |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
KOReader and rsync | dmpop | KOReader | 3 | 04-23-2022 10:37 AM |
rsync PC to Kobo | Lo2 | Kobo Developer's Corner | 3 | 03-25-2019 06:06 PM |
Rsync on Kindle Touch | leonardo84 | Kindle Developer's Corner | 11 | 10-31-2012 05:31 PM |
Request Geek Tools for moving files to/from the Library: ssh/sftp/rsync/samba | kenjennings | enTourage Archive | 6 | 04-06-2010 11:36 PM |
rsync | thetechnobear | iRex | 1 | 03-05-2008 01:57 PM |