Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-16-2021, 05:10 PM   #1
Cootey
Absentminded Reader
Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.
 
Cootey's Avatar
 
Posts: 1,104
Karma: 6463851
Join Date: Apr 2017
Device: Kobo Mini, Clara HD, Elipsa; Kindle Paperwhite 3 & 4; iOS eReader apps
How to backup your Kobo on a Mac

I backup my Kobo for two reasons: 1) Peace of mind and 2) Creating a clean backup before experimenting with third party scripts & apps. I’m not a dev, but I know my way around the Mac Terminal, so I thought I’d share what I learned here for others. Thanks to everybody’s helpful feedback.

There are two ways to backup your Kobo. The first is the simplest and quickest. It's perfect for keeping an up to date backup available on your hard drive. The second is the total disk image—a complete clone of your Kobo. It’s the most thorough, but it is also the most time consuming and complicated. It's also overkill for typical backup needs.

When you plug your Kobo into your Mac, only the KOBOeReader partition mounts. There are two other hidden Linux partitions as well, but the Kobo only allows KOBOeReader to mount. This is fine if you just want a backup of your personal data, but if you want a complete clone of your Kobo internal memory, skip over this first part.

A) Backing Up Your Personal Data - Simple & Quick

1) Decide where you want to store your backup. Create a folder there with a memorable name. For example, I might label mine “KoboElipsa_2021-07-26”, but “KoboBackup” or something like that works as well.

2) Open a Terminal shell (/Applications/Utilities/Terminal.app) and type the following, but don’t hit “return”:

Code:
cp -Rvp /Volumes/KOBOeReader/
In the Finder, drag your backup folder over the Terminal window and drop it. Its path will autofill for you. It should look something like "cp -Rvp /Volumes/KOBOeReader/ /Volumes/Drive/path/backupfolder/".

“cp” will copy the contents of your Kobo’s public partition, recursively (-R) drilling down through folders to find all the files, preserving (-p) their times, dates, etc., and mirroring back everything it is copying to the Terminal (-v, verbose mode). You can leave the “v” off the command if you aren’t interested in seeing all the files stream by.

And that’s it! Your Kobo’s database, ebooks, and other personalized items will be safely backed up. You’ve created an exact backup of your Kobo’s public partition.

3) If you should ever need to restore your Kobo from the backup, type this into the terminal:

Code:
rsync -av --delete --progress /Volumes/Drive/path/backupfolder/ /Volumes/KOBOeReader/
“Rsync” will synchronize your Kobo to match the backup. Use “rsync” here instead of “cp” to remove any new misconfigured files or corrupted databases that could be causing problems since you last backed up. Obviously, change the path and folder name above to match your own. You could type the first part into Terminal, then drag & drop your backup folder onto the Terminal, then do the same for your Kobo to autofill the Unix paths for you.

✧ ✧ ✧


B) Creating a Total Disk Image of Your Kobo – Time Consuming & Complicated


As mentioned before, Kobo hides its Linux partitions from the Mac when mounting the Kobo to the Desktop. To create a clone of the full disk image on your Mac, please follow these steps:

1) To access your Kobo’s internal SD card, turn off your Kobo, then remove the back. At this point, I will refer you to Youtube or other threads where the specifics for disassembling your Kobo are discussed.

2) Remove the SD card from its socket and plug it into a USB card reader connected to your Mac. The Linux partitions are still hidden, but they are now accessible to your Mac.

3) Open a Terminal shell (/Applications/Utilities/Terminal.app) and type the following, then hit "return":

Code:
diskutil list
Look to see which disk number is assigned to KOBOeReader just above and to the left of its name. It might look something like /dev/disk4. From now on, I will refer to it as diskX, with "X" representing the drive number your individual Mac gave to your Kobo.

4) Next, we need to unmount the Kobo through the Terminal without ejecting it. Type the following, then hit "return":

Code:
diskutil unmountDisk diskX
If it is successful, you will see the following message:

Code:
Unmount of all volumes on diskX was successful
3) Now we are ready to create a backup disk image of your Kobo's entire SD card. Think of where you want to store your backup disk image and what you'd like to call it. Type the following, BUT DO NOT HIT “RETURN” YET:

Code:
sudo dd if=/dev/diskX of=
In the Finder, drag and drop the folder of where you want the disk image to be stored onto the Terminal window. It's Unix path will be autofilled in for you. Then type the archive name that you’d like at the end of the path, leaving no spaces between the "/" and your filename. Mine looked like this:

Code:
sudo dd if=/dev/disk4 of=/Volumes/Raven\'s\ Whim/Crypt/KOBOeReader/KOBOeReader-2021-07-16.dmg
(Wondering what this does? "sudo" means "super user do", and it will prompt you for your password, then give "dd" full access to the entire Kobo volume. "dd" means "Data Definition", and it's a geeky reference to an old IBM command. Basically, it clones your Kobo volume exactly—even the unused space. "if" means "input file" and "of" means "output file".)

Now hit "return". You will be prompted for your password. Once it is accepted, go catch a movie. This will take quite some time as it is making an exact copy of your Kobo's SD card bit by bit, including the two hidden Linux partitions. dd doesn't give any feedback, unfortunately, but expect 2-4 hours.

(There is are two ways get dd to give you progress updates, but one requires interrupting the process, and the other requires homebrewing your Mac, which is outside the scope of this tutorial. If there's interest, I'll post more details in a comment.)

4) Once dd does its thing (you'll see a final report and be returned to the prompt >), you can safely detach your Kobo from your Mac. You now have an exact duplicate of your Kobo on your Mac.

With compression, my 128GB SD card created a 127.3GB disk image. The larger the SD card on your Kobo, the longer this process will take. It's slow, but extremely thorough. Double clicking on the disk image will mount it as if it is your actual Kobo.

5) In the event you need to restore your Kobo’s entire disk image, connect your Kobo to the Mac and use "diskutil list" in Terminal to see which disk number has been assigned to your Kobo. Then type "diskutil unmountDisk diskX" in the Terminal to prepare your Kobo for the final step. Type the following into Terminal:

Code:
sudo dd if=/path/backup_disk_image.dmg of=/dev/diskX
Replace "path" and "backup_disk_image.dmg" with the actual path and filename of your backup. You can use the drag and drop technique with Finder if you’d like. Don't forget to change "diskX" to reflect your Kobo's drive number. Then hit return. This will also take a long time, so be patient. When it is finished, your Kobo will be an exact clone of the backup.

I hope this has been helpful.

Last edited by Cootey; 07-27-2021 at 04:28 AM.
Cootey is offline   Reply With Quote
Old 07-16-2021, 05:16 PM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Quote:
Originally Posted by Cootey View Post
The Kobo only mounts the KOBOEREADER partition, but there are two hidden Linux partitions as well. We'll need to use Terminal to back up the entire disk.
Err, no?

Only the "public" internal storage partition and the external SD card (where available) are exported over USBMS.

(I mean, backing up /mnt/onboard is an entirely valid workflow, and what people not aggressively modding their devices should be concerned about, but don't mistake it for a full image).

Last edited by NiLuJe; 07-16-2021 at 05:21 PM.
NiLuJe is offline   Reply With Quote
Advert
Old 07-16-2021, 11:35 PM   #3
Cootey
Absentminded Reader
Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.
 
Cootey's Avatar
 
Posts: 1,104
Karma: 6463851
Join Date: Apr 2017
Device: Kobo Mini, Clara HD, Elipsa; Kindle Paperwhite 3 & 4; iOS eReader apps
Quote:
Originally Posted by NiLuJe View Post
Err, no?

Only the "public" internal storage partition and the external SD card (where available) are exported over USBMS.

(I mean, backing up /mnt/onboard is an entirely valid workflow, and what people not aggressively modding their devices should be concerned about, but don't mistake it for a full image).
In Disk Utility, I could only see the one partition, and "diskutil" in Terminal only showed the one partition. I assumed the other partitions were hidden, but apparently, Kobo only allows one partition to be exposed to the OS, which I think is what you were trying to tell me.

I believe that I figured out these steps when I had my Clara SD card out (which would have bypassed Kobo's filter), but then forgot that step because of all the drama my Elipsa put me through. I'll make the necessary corrections. Thanks for bringing it to my attention.

Spoiler:
> diskutil list external
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *2.0 TB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_HFS Book of Remnants 2.0 TB disk2s2

/dev/disk3 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *8.0 TB disk3
1: EFI EFI 209.7 MB disk3s1
2: Apple_HFS Raven's Whim 8.0 TB disk3s2

/dev/disk4 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: KOBOeReader *30.5 GB disk4

Last edited by Cootey; 07-17-2021 at 12:48 AM.
Cootey is offline   Reply With Quote
Old 07-27-2021, 04:09 AM   #4
Cootey
Absentminded Reader
Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.Cootey ought to be getting tired of karma fortunes by now.
 
Cootey's Avatar
 
Posts: 1,104
Karma: 6463851
Join Date: Apr 2017
Device: Kobo Mini, Clara HD, Elipsa; Kindle Paperwhite 3 & 4; iOS eReader apps
As far as I can tell, this is the final version. These are the steps I have used for myself on multiple occasions. Let me know if you spot any issues or have any questions.
Cootey is offline   Reply With Quote
Old 03-12-2022, 11:27 AM   #5
mbraun
Junior Member
mbraun began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2022
Device: kobo mini
Great instructions. I have a kobo mini that has issues and now have a mini .img but am not sure how to get it onto the sd card. Any suggestions or directions? I have a mac.
mbraun is offline   Reply With Quote
Advert
Old 03-12-2022, 07:00 PM   #6
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
The instructions are above. You will need to follow most of the steps in "Creating a Total Disk Image of Your Kobo", but, already have the image, so you skip step 4.
davidfor is offline   Reply With Quote
Old 03-13-2022, 12:26 AM   #7
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Cootey View Post
5) In the event you need to restore your Kobo’s entire disk image, connect your Kobo to the Mac and use "diskutil list" in Terminal to see which disk number has been assigned to your Kobo. Then type "diskutil unmountDisk diskX" in the Terminal to prepare your Kobo for the final step. Type the following into Terminal:

Code:
sudo dd if=/path/backup_disk_image.dmg of=/dev/diskX
Replace "path" and "backup_disk_image.dmg" with the actual path and filename of your backup. You can use the drag and drop technique with Finder if you’d like. Don't forget to change "diskX" to reflect your Kobo's drive number. Then hit return. This will also take a long time, so be patient. When it is finished, your Kobo will be an exact clone of the backup.

I hope this has been helpful.
One issue with step 5 as it is written.

You will need to follow steps 1 and 2 to remove the μSD card from your Kobo and mount it on your Mac using an USB or other adapter prior to restoring the complete image. Simply connecting your Kobo to the Mac will only expose the KOBOeReader partition so restoring the image will not succeed.
DNSB is offline   Reply With Quote
Old 08-26-2022, 03:28 AM   #8
littletuckers
Junior Member
littletuckers began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2022
Device: Kobo Mini
Thank you for these detailed instructions. I managed to follow them all the way to step 5, but now I can't mount my Kobo image .dmg file onto the new 32GB sd card.
I've entered the sudo dd code, the right path and dmg filename and the correct disk number, but Terminal keeps telling me "Resource busy".
The Kobo does not even recognise the 32GB sd card, whether it's blank or has anything on it. Both my card-reader and the SD-card-adapter that came with the micro sd card recognise it when plugged into the Mac, but the Kobo does not register it at all.
Is there anything else I can try?
littletuckers is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Glo HD Kobo backup image on Mac fotoroberto Kobo Reader 9 07-17-2021 06:49 AM


All times are GMT -4. The time now is 07:42 AM.


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