Where are attachments stored in iCloud sync?

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
DrJJWMac
Posts: 345
Joined: Sat Jun 22, 2019 8:04 am
Location: Alabama USA

Where are attachments stored in iCloud sync?

Post by DrJJWMac »

I am using both macOS and iPadOS. I am struggling to understand the two different sync methods, iCloud and WiFi. For example, suppose that I have a macOS library named Test. I want to sync it with an iPadOS library also named Test. I store all attachments on macOS in Attachments/TestFiles

WiFi sync
--
Attachments are stored locally on macOS in Attachments/TestFiles and locally on iPadOS in Attachments. We always have two copies of the electronic files. The electronic files are synced as needed.

iCloud sync
--
Attachments are stored in iCloud. The macOS library and iPadOS library point to the iCloud folder. We have only one copy of the electronic files. The macOS library and the iPadOS library point to the attachment in the iCloud folder.

My understanding comes from reading how to set up iCloud sync. It says that attachments will be MOVED to the iCloud folder. If my understanding of iCloud sync is correct, I should find that the Attachments/TestFiles stored locally on macOS is empty once I set up the iCloud syncing.
--
JJW
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Where are attachments stored in iCloud sync?

Post by Jon »

For iCloud file sync Bookends actually has no role on how attachments are handled. It's all done by the OS, just as you might do yourself without Bookends installed. The only, subtle, difference is that to share with iOS the PDFs must be in the special Bookends folder (the one with the icon), which is created and managed by macOS (again, not Bookends). You can google for exactly how iCloud Drive syncs files. Note that depending on your local settings the PDFs could be removed from the local drive and stored only in the cloud -- that would be indicated by a down arrow next to the PDF name in the Finder. Bookends can't use these PDFs, so it automatically asks macOS to download them (an option that can be disabled in preferences if you want to handle that manually).

As far a "moving", I suspect you're referring to the usual options that Bookends offers when attaching PDFs -- move or copy to the default folder, or leave in place.

Jon
Sonny Software
DrJJWMac
Posts: 345
Joined: Sat Jun 22, 2019 8:04 am
Location: Alabama USA

Re: Where are attachments stored in iCloud sync?

Post by DrJJWMac »

OK. I tested the iCloud approach two ways with annotations on a PDF.

First, I kludged around with between macOS and iPadOS by setting up the share folder on iPadOS first and then syncing/sharing. I discovered that, with this approach, the PDFs did not always sync to macOS. I had two attachment folders, one for macOS as Attachments/TestFiles and one as iCloud/iPadOS at Bookends/Attachments/TestFiles.

In the second approach, I set up a macOS library with its default attachments folder Attachments/TestFiles. I set up iCloud sync for the library. I then set up Sharing Attachments from the macOS side. This MOVED all the attachments from macOS to iCloud. Finally, I added the library from iCloud to my iPadOS.

In summary, when you want to sync a library and its attachments between Bookends on macOS and on iPadOS using iCloud, you must

* Set up the library and its attachments on macOS first.
* Set up the iCloud sync from macOS.
* Set up the iCloud share from macOS.
* Allow time for the attachments to be moved from the local macOS folder to the iCloud folder.
* Add the new library on the iPad from the iCloud folder.

When you skip step 3 above, while the library may sync, the attachments may not sync.

One final note from this test. On the properly synced + shared library, I notice on the macOS app that I can still possibly change the Attachment Subfolder away from its new iCloud location.
defaultattachments.png
defaultattachments.png (44.42 KiB) Viewed 2140 times
I did not try to change the location, but I could pull up the dialog as seen above. You may want to consider whether users should be locked out of being able to change this location in the case where the attachments for the library are being shared via iCloud.
--
JJW
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Where are attachments stored in iCloud sync?

Post by Jon »

To be clear for others, for personal sync there is no need to set up sharing with others. And there is no particular order you need to set up syncing -- iPad or macOS first, doesn't matter. Remember that file sync is scheduled by iCloud Drive, and there can be a lag (a considerable lag in some cases) -- only Apple could explain why.

One thing I'm not sure you understand -- the setting for the default attachment folder doesn't actually do anything. It doesn't cause PDFs to be moved or for sync to initiate, or anything else. It is a passive setting that simply tells Bookends which default path to use when looking for attachments, that's all.

The process is far simpler than you spell out. This video tutorial shows you have to set up sync (the first half) and share, if you need it (second half).

https://www.youtube.com/watch?v=-sS3SNt-btU

Jon
Sonny Software

P.S. This site has tips on how you can force iCloud Drive to sync now.

https://help.noteplan.co/article/86-how-to-force-sync
DrJJWMac
Posts: 345
Joined: Sat Jun 22, 2019 8:04 am
Location: Alabama USA

Re: Where are attachments stored in iCloud sync?

Post by DrJJWMac »

My main interest is to annotate PDFs on my iPad while off-line from the internet. When I do this, I want to keep the annotated PDFs in (tight) sync between the iPadOS and macOS versions of Bookends. I also want to have a consistent way to make routine, snap-shot backups of all PDFs associated with a given library. To summarize ...

In one approach, I can upload (move) the library to iCloud. Attachments are stored in only one place -- the iCloud Bookends sub-folder that I choose when I set up this option for the first time. The OS/Apple controls the frequency and integrity of syncing a PDF in the chain iPadOS <-> iCloud <-> macOS. Neither the iPadOS nor the macOS version of Bookends must be open for the sync to happen, but PDFs that are newly annotated on the iPad will sync only after I reconnect the iPad to the internet. To make a reliable snap-shot backup, I should first assure that both the iPadOS and the macOS versions are in full sync with the iCloud storage folder. Then, I can create a ZIP archive of the Bookends iCloud attachment sub-folder.

In another approach, I can use Bookends WiFi sync. Attachments are stored in two places, the iPad and macOS. On the iPad, attachments are stored in the local Bookends Attachments folder. On macOS, attachments are stored in the local Attachments folder or a chosen sub-folder. I control the frequency of syncing a PDF in the chain iPadOS <-> WiFi <-> macOS. Both the iPadOS and the macOS versions of Bookends must be open and connected to the same WiFi network for the sync to happen. To make a reliable snap-shot backup, I would store all attachments for the library in a sub-folder rather than in the default Attachments folder. I should first force a WiFi sync between the iPadOS and the macOS versions. Then, I can create a ZIP archive of the local macOS attachments sub-folder.

The process is relatively easy in either approach, iCloud or WiFi sync. It seems that I needed to walk through the pros/cons in each approach. I hope this captures the most significant ones.
--
JJW
DrJJWMac
Posts: 345
Joined: Sat Jun 22, 2019 8:04 am
Location: Alabama USA

Re: Where are attachments stored in iCloud sync?

Post by DrJJWMac »

As a follow up, here are some other insights, at the risk of repeating some things already said.

* When you use WiFi sync, the attachments on the iPad are stored locally on the iPad, and they are stored in the default Attachments folder for Bookends. While you can move the attachments manually to sub-folders, I have found that this sometimes if not always causes confusion in Bookends iPadOS and/or in the ability to sync properly back to Bookends macOS. For someone who has multiple attachment sub-folders on macOS (one for each library that I maintain), the inability to manage sub-folders on Bookends iPadOS with WiFi sync is somewhat of a setback.

* When you use iCloud sync, the attachments are stored in their own sub-folder in the Bookends iCloud folder. They are moved not copied to the iCloud folder. In essence, the iCloud folder is not being used as a sync / backup, it is being used as the primary folder for both macOS and iPadOS. When you want/need the peace of mind to have a second storage (not just iCloud), you can consider using a third party app to keep the iCloud folder in sync with a local macOS folder.
--
JJW
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Where are attachments stored in iCloud sync?

Post by Jon »

#2. This is incorrect, except in one specific situation. The PDFs are typically not removed from your HD and stored only in the cloud. They exist in both places. Please google for how iCloud Drive works -- remember, Bookends has nothing to do with how attachments are handled, it's macOS/iCloud Drive that does this. The only time your attachments might be moved to the cloud and removed from the HD is if you have enabled "Optimize Mac Storage" in System Preferences -> iCloud -> iCloud Drive Options. If a file has been moved, you'll see a small down arrow next to the file when you examine iCloud Drive in the Finder.

Note that Bookends cannot read any files that are solely in the cloud -- you'll get a "can't find file" error. To prevent this, Bookends has a Preferences setting iOS -> Force download of PDFs moved to iCloud, which will work in the background to bring back any PDF the OS moved (not copied) to the cloud. This is on by default.

Jon
Sonny Software
DrJJWMac
Posts: 345
Joined: Sat Jun 22, 2019 8:04 am
Location: Alabama USA

Re: Where are attachments stored in iCloud sync?

Post by DrJJWMac »

Thank you. The clarification helps. I did have the Optimize Mac Storage toggle turned on.
--
JJW
Post Reply