4

I just accidentally deleted a pdf in iBooks on my MacBook, and I'm trying to use time machine to recover it. I learnt from the following question that I can only get access to the folder storing all my iBook files using terminal:

Where are my iBooks stored in macOS Sierra?

However, it seems that I couldn't use terminal when using Time Machine to restore old files. Is there any way to get around this?

I'm running macOS High Sierra.

  • 1
    Can you clarify what sort of PDF this is? That is, is it something you purchased, meaning you can just redownload it? If so, that may be a quick fix for you. Also, can we infer from the question you're linking to that you're running macOS Sierra? If not that could change things, so clarifying this in your question would be good. – Monomeeth Dec 13 '17 at 4:33
  • It is a pdf that I cannot easily download again, not something I purchased. I'm running macOS High Sierra. – tqw Dec 13 '17 at 4:35
  • 1
    So, besides trying to use Terminal, did you try to use Time Machine to restore the specific PDF? If so, what steps did you follow? – Monomeeth Dec 13 '17 at 4:49
  • The point is that I couldn't find the specific PDF using Finder in Time Machine without using terminal--one cannot find the folder containing that PDF using Finder. – tqw Dec 13 '17 at 4:51
1

You should be able to restore the PDF from the backup using the command-line technique I posted in How can I restore iBooks stored in iCloud from a Time Machine backup?

Find the most appropriate backup:

$ tmutil listbackups 
[...]
/Volumes/Time Machine Backups/Backups.backupdb/macbook/2017-12-11-123506
/Volumes/Time Machine Backups/Backups.backupdb/macbook/2017-12-12-212807
/Volumes/Time Machine Backups/Backups.backupdb/macbook/2017-12-13-224355

Check if your missing PDF is available:

$ ls '/Volumes/Time Machine Backups/Backups.backupdb/macbook/2017-12-12-212807/Macintosh HD/Users/USERNAME/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents/file.pdf'
/Volumes/Time Machine Backups/Backups.backupdb/macbook/2017-12-12-212807/Macintosh HD/Users/USERNAME/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents/file.pdf

This assumes you know the name of the file, but if not you can omit the file.pdf and you'll get the full listing for the directory.

Restore the file to your Desktop:

$ tmutil restore '/Volumes/Time Machine Backups/Backups.backupdb/macbook/2017-12-12-212807/Macintosh HD/Users/USERNAME/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents/file.pdf' /Users/USERNAME/Desktop/
Total copied: 7.89 MB (8270868 bytes)
Items copied: 1

Then you can add the PDF to iBooks again as normal.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .