Friday, May 29, 2020

How I Set Up a Home AppleTalk Network in 2020

The Introduction

I made additional changes to my home Network to reduce Ethernet cables and allow more flexible computer locations in July.  See this blog post for further information.

I recently had reason to set up a local area network in my home using AppleTalk to connect an Apple IIGS to a Power Macintosh 5400/120 (PM5400). I decided to also network the PM5400 to a G3 B&W Macintosh. None of the three computers involved had built-in Wifi, but two of them - the two Macintoshes - have built-in Ethernet ports, and two of them - the Apple IIGS and PM5400 - have built-in serial ports that can be used for networking.  All of them are running operating systems that support AppleTalk.  None of them needed to be connected to the internet. It had been over 15 years since I last used AppleTalk so I had some relearning to do. This blog post documents what I learned getting this vintage network set up.

Note that this solution does not use an AppleShare server, and instead utilized the Personal File Sharing capabilities released with Mac OS 7. This particular solution will not allow you to remote boot your IIGS from an AppleShare server, although I understand that that can be done with the commercial product AppleShare v3 installed on the Mac (the remote boot functionality was removed in AppleShare v4.)

The Computers and Goals

Apple IIGS ROM 01 running GS/OS 6.0.1. The IIGS has built-in support for AppleTalk and the network can be connected to one of two serial ports - the modem port and the printer port. The ROM 01 IIGS has some differences from the later ROM 03 IIGS when it comes to AppleTalk. Ideally I wanted to be able to transfer files to the IIGS over the AppleTalk network from folders on the PM5400. Alternative mediums for transferring files are the 3.5" 800K DS/DD drive, the 5.25" 140K floppy drive, a USB stick attached to a BOOTi device, and an SD card attached to a FloppyEmu device. Of these the only medium in common with the PM5400 is the 3.5" 800K DS/DD floppy drive. GS/OS includes an HFS File System Translator (FST) so that Macintosh formatted HFS disks can be used.

Power Macintosh 5400/120 (PM5400) capable of running both Mac OS 7.6.1 and Mac OS 9.1. The PM5400 has an internal CD-ROM drive and an internal Apple 3.5" drive capable of reading/writing both DS/HD 1.44 MB and DS/DD 800K disks. It also has a SCSI port with attached Iomega 100 MB Zip drive. (Note, everything discussed could be done using System 7, 8, or 9 on the PM5400. There is one exception and that is that running Mac OS 9 will make it slightly easier to transfer files from the internet later.)

G3 B&W Macintosh running Mac OS 9.2. The G3 has an Ethernet port but no serial port. It has USB ports and a DVD drive capable of burning CD's, can read and write DS/HD 1.44 MB disks, and can use an Iomega Zip drive. The G3 is also able to dual boot into MacOS X 10.4 "Tiger" which is significant only when it comes to transferring files from the internet later.

The vintage network is not going to be connected to the internet. Getting software from the internet distributed to the computers on my vintage network using nothing but net is discussed in a later section.

The Macintosh ProDOS File System extension is installed on both the PM5400 and G3 so that Apple II ProDOS formatted disks can be used, but it is not required for the networking to work.

  IIGSPM 5400 G3 B&W 
 USB thumb drive Y (via BOOTi card)  Y
 SD card Y (via FloppyEmu)  Y (via USB adapter)
 Zip 100MB (SCSI)  Y Y
 Zip 250MB (USB)   Y
 CD drive  Y Y
 3.5" DS/DD 800K Y Y 
 3.5" DS/HD 1.44MB  Y Y (via USB)
 5.25" 140K floppy Y  
 Ethernet port  Y Y
 Serial port Y Y 

While each computer has several means of loading files onto it using physical media, a network makes file transfers very simple and removes the need to find common media.

In addition I wanted to be able to play the game HyperBattleship! using the two Macintoshes. This is a free game Claris Corporation released with Mac OS System 7 as a demonstration of Apple Events. While this game as originally released was not fully compatible with Mac OS 9, I subsequently released a modified version of it that can be used with Mac OS 9. (More on HyperBattleship later.)

Equipment and Software Required

To connect the Apple IIGS and PM5400 serial ports I used 2 Farallon PhoneNet Plus adapters, (Farallon manual here) a length of modular phone extension cable with RJ11 plugs, and 2 PhoneNet RJ11 terminating resistors. The photo below shows a Farallon PhoneNet Plus with a terminating resistor in one of its RJ11 sockets. The rule to remember with PhoneNet Plus adapters is that each socket must be filled by either a terminating resistor or a wire to another PhoneNet Plus adapter. (See the Q&A section at the end for more on terminating resistors.)


Important to note is that in the 1980's standard practice (in the US anyway) was to use phone lines with 4 wires = green, red, yellow, and black. A phone device requires only two of the four wires and typically residential phones only use the green and red pair. The Farallon PhoneNet Plus adapters utilize the typically unused black and yellow pair, which provides the added bonus that AppleTalk networks can be run through your existing home phone wiring (caveat - some homes may have been wired in a way that is incompatible with AppleTalk, so take care using existing phone jacks). However, if you purchase a length of phone cable today for use with the PhoneNet adapters you need to make sure that it has all 4 wires, because current practice is to save copper by only including the green-red pair.

To connect the PM5400 to the G3 B&W I connected each to an Ethernet hub (actually an Apple Airport Extreme Base Station, but any Ethernet hub should do) with standard Ethernet cables. Theoretically connecting the computers directly with either one Ethernet cable or one Ethernet cross-over cable should have worked, but I was unable to get it working without the hub. Using a hub also allows for connecting others computers via Ethernet to the vintage network.

No software needed to be purchased and all software utilized were developed and released by Apple for free use. The IIGS runs the GS/OS 6.0.1 operating system with the HFS FST installed and the AppleShare services installed off of the GS/OS 6.0.1 Installer disk. The Macs have standard installations of MacOS 7 and 9. The only additional extension required is the unsupported Macintosh LocalTalk Bridge control panel which is installed only on the PM5400 as it is responsible for bridging Ethernet and AppleTalk. The LocalTalk Bridge control panel requires a 68020 processor or faster, System 7 - 9, and a Mac with both an Ethernet port and a serial port. GS/OS can be downloaded from here and the LocalTalk Bridge control panel can be found here.

If you also use ProDOS disks to transfer files to your Macintosh, as I have at times, then you should consider downloading the ProDOS File System extension from here, though it is not needed for the networking. This Macintosh extension works on System 7 - 9, and allows ProDOS formatted DS/DD 800k disks to be used with your Mac's 800K or 1.4 MB floppy drive.

The Network Topography

While ideally there would be one AppleTalk network, that wasn't possible due to the lack of a common port to utilize across all three machines. So there are two AppleTalk networks bridged by the LocalTalk Bridge control panel installed on the PM5400. This bridging allows the IIGS to mount folders on both the PM5400 and the G3 at the same time.

1. Apple IIGS connected via Farallon PhoneNet Plus adapters to PowerMac 5400 using the serial printer ports.

2. PowerMac 5400 connected to an Ethernet hub (Airport Extreme) via the Ethernet port and the G3 B&W connected to the same Ethernet hub from its Ethernet port.

Network diagram
Network diagram


Configuring the IIGS

Plug a Farallon PhoneNet adapter into the printer port. Fill one RJ11 port on the adapter with a terminating resistor. In the other port plug in one length of modular 4-wire phone cable. The other end of the cable should be plugged into a second Farallon PhoneNet Adapter that is plugged into the printer port on the PM5400. That PhoneNet Adapter should also have a terminating resistor plugged into its second RJ11 port.

The IIGS is running System 6.0.1, which is the final official Apple IIGS system software release. At the time of this writing the last unofficial (ie. community) release is 6.0.4 which includes some changes that affect AppleTalk, but nothing that should create issues if I should upgrade to 6.0.4 in the future.

From the GS/OS Installer disk run the AppleShare installation script.  This will install a number of CDevs, Inits, NDAs, and FSTs that are required for the IIGS to access Macs over AppleTalk.

When you reboot after the installation completes you will be asked for the network name of the computer. If you wish you can leave it blank and set it later in the AppleTalk CDev.

In the Control Panel (CDA or NDA) set Slot 7 to Built-in AppleTalk

On a ROM 03 IIGS you do not need to make any additional slot changes for AppleTalk, but on a ROM 01 IIGS you have to set slot 1 to My Card if you are going to use the printer port for AppleTalk, or set slot 2 to My Card if you are going to use the modem port for AppleTalk. I chose to use the printer port and so set Slot 1 to My Card (this is required even though there is no physical card in slot 1).



Configuring the Macintoshes

On the PM5400 plug a Farallon PhoneNet adapter into the printer port. Fill one RJ11 port on the adapter with a terminating resistor. In the other port plug in one length of modular 4-wire phone cable. The other end of the cable should be plugged into a second Farallon PhoneNet Adapter that is plugged into the printer port on the IIGS. That PhoneNet Adapter should also have a terminating resistor plugged into its second RJ11 port. (See the Q&A section for more about the use of terminating resistors.)

On both the PM5400 and the G3 plug an Ethernet cable into the Ethernet port and the other end into a powered Ethernet hub.

Install the LocalTalk Bridge control panel into the System Folder:Extensions folder. It will automatically turn on the next time the operating system is booted.

In the AppleTalk control panel set the Connection to Ethernet. (Incidentally, if all I wanted to do was connect my IIGS to the PM5400 without the G3 being in the mix then I would not use the LocalTalk Bridge control panel and would set the AppleTalk control panel to Printer because the PhoneNet Plus adapter is plugged into the Printer serial port.)



Create the folder that you want to share with the IIGS.

For System 7:

(Note: I decided to use individual accounts for access, but you can also turn on the Guest functionality if you do not want to create accounts)

To allow connections from the Apple IIGS:

- In the Users & Groups control panel create the new IIGS user using File > New User. This user name should match what you intend to use as the computer name on the IIGS.
- Double-click the new user and check the "Allow user to connect" checkbox. Passwords are optional. On a private home network passwords for AppleTalk are not necessary.

To allow connections from the G3 B&W:

- In the Users & Groups control panel and create the new G3 user using File > New User. This user name should match what you intend to use as the computer name on the G3.
- Double-click the new user and check the "Allow user to connect" checkbox. Passwords are optional. On a private home network passwords for AppleTalk are not necessary. Because I will be playing HyperBattleship! with this user, I also checked the "Allow user to link to programs on this Macintosh".


Reboot the computer.

With the AppleTalk control panel or from the control strip turn on AppleTalk.

Open the Sharing Setup control panel and set an owner name and Macintosh name. Macintosh name is what will be displayed on the IIGS when you try to connect to a Mac folder.  Turn on File Sharing. In my case, because I wanted to play HyperBattleship! I also turned on Program Linking which it needs.

In Finder select the folder that you created for sharing and go to File > Sharing...  Check the "Share this item and its contents" checkbox. Check all of the permissions for any user who will be accessing it or more simply just use everyone. When you close the dialog, when asked click the Save button to save permissions. The folder icon should change to indicate that it is now being shared.

For System 9 (both the PM5400 and the G3):

(Note: I decided to use individual accounts for access, but you can also turn on the Guest functionality if you do not want to create accounts)
In the File Sharing control panel Start/Stop tab set the Owner name, password, and computer name. Check "Enable File Sharing clients to connect over TCP/IP" and start File Sharing. Because I need Program Linking to play HyperBattleship! I also checked the "Enable Program Linking clients to connect over TCP/IP" and started Program Linking.

To allow connections from the Apple IIGS:

- In the File Sharing control panel Users & Groups tab create the new IIGS user by clicking "New User". Under Identity set the user name to match what you intend to use as the computer name on the IIGS. Passwords are optional. On a private home network passwords for AppleTalk are not necessary. Under Sharing check "Allow user to connect to this computer".

To allow connections from the other Macintosh:

On the PM5400:
- In the File Sharing control panel Users & Groups tab create the new G3 user by clicking "New User". Under Identity set the user name to match what you intend to use as the computer name on the G3. Passwords are optional. On a private home network passwords for AppleTalk are not necessary. Under Sharing check "Allow user to connect to this computer". Because I will be playing HyperBattleship! with this user, I also checked the "Allow user to link to programs on this Macintosh".

On the G3:
- In the File Sharing control panel Users & Groups tab create the new PM5400 user by clicking "New User". Under Identity set the user name to match what you intend to use as the computer name on the PM5400. Passwords are optional. On a private home network passwords for AppleTalk are not necessary. Under Sharing check "Allow user to connect to this computer". Because I will be playing HyperBattleship! with this user, I also checked the "Allow user to link to programs on this Macintosh".


Reboot the computer.

With the AppleTalk control panel or from the control strip turn on AppleTalk.

Open the Sharing Setup control panel and set an owner name and Macintosh name. Macintosh name is what will be displayed on the IIGS when you try to connect to a Mac folder.  Turn on File Sharing. In my case, because I wanted to play HyperBattleship! I also turned on Program Linking which it needs.

In Finder select the folder that you created for sharing and go to File > Sharing...  Check the "Share this item and its contents" checkbox. Check all of the permissions for any user who will be accessing it or more simply just use everyone. When you close the dialog, when asked click the Save button to save permissions. The folder icon should change to indicate that it is now being shared.

Verifying the New AppleTalk Network is Set Up Correctly

On the IIGS open the AppleShare Control Panel and under "Select a file server" you should see the names of the two Macintosh computers. If you do not then make sure that AppleTalk is on on the computers and Ethernet is selected and make sure the Ethernet hub is turned on. Also, if you have an accelerator card like the ZipGS or Transwarp GS in your IIGS, verify that they are configured to be compatible with AppleTalk.



Select one and click OK to initiate the AppleTalk connection. If the user is set up correctly you will be asked what items you want and should see the name of the shared folder you created.  If you do not, then verify that the shared folders permissions are set to allow read/write permissions from the IIGS, and that File Sharing is turned on.



If you select the shared folder and click OK it should be mounted on your desktop. You can simplify the steps of mounting the shared folder by creating an alias to the mounted folder.  Just select the mounted folder icon on the desktop and either type Apple-M or select Make Alias... from the Finder's Extras menu. Once the alias is created just double-clicking on it will mount the folder. (The Easy Mount init adds this ability to the Finder Extras menu and is one of the files installed when you install AppleShare from the System 6.0.1 Installer disk.)


On either Mac open the Chooser from the Apple menu and click the AppleShare icon. Under "Select a file server" you should see the name of the other Macintosh.  If you do not then make sure that AppleTalk is on on the computers and Ethernet is selected and make sure the Ethernet hub is turned on.


Select the computer in the list and click OK to initiate the AppleTalk connection.  If the user is set up correctly you will be able to select the shared folder to mount and it should then mount on your desktop. You can simplify the steps of mounting the shared folder by creating an alias to the mounted folder.  Just select the mounted folder icon on the desktop and either type ⌘-M or select Make Alias from the File menu. Once the alias is created just double-clicking on it will mount the folder.

HyperBattleship! for Mac OS 9

HyperBattleship! v2.1 was freely released by Claris Corporation when Apple released Mac OS System 7. It is a Macintosh HyperCard implementation of the Milton Bradley tabletop two-player game Battleship. The stack demonstrates the Apple Event capabilities introduced in System 7 and allows the opponents to play on separate computers on the AppleTalk network. The original version can be found on archive.org here.

HyperBattleship! for OS9 is HyperBattleship! v2.1 with the addition of a single background button needed to allow Mac OS9 machines to properly play the game. I released this in March 2002. It is fully compatible with Mac OS 7 and 8.


The OS9 incompatibility with HyperBattleship! v2.1 is evident when a machine running OS9 is contacted from another machine in order to initiate a game. What appears to be a HyperCard bug (observed in HyperCard 2.2 through 2.4) prevents the send command issued by the OS9 machine from prompting the login dialog.  Without the login dialog any communications initiated by the OS9 will fail because the OS9 machine is not properly linked to the other machine and therefore the game cannot be played.

The solution takes advantage of an oddity that the identical send command issued from the message box rather than from within the script will properly initiate the login dialog. So a background button added to the game card allows the forcing of a link from the OS9 machine to the opponent machine by populating the message box with the appropriate command.  After the link is forced communications from the OS9 machine will work properly.  Note that the machine that first initiates contact does not need to force a link, even if it is running OS9, only an OS9 machine that has been requested to play needs to force a link before later responding affirmatively to a second request. Also, in order to send a message from the msg box the HyperCard userlevel must be set to 5, which is normally not the case with HyperCard Player. I recommend using HyperCard 2.4 is using OS 9.

So if you are running OS9 when you are contacted to play a game you should first respond negatively.  Then use the force link button to connect to the requestor's machine.  Then notify the requestor to repeat the proposal to play and this time answer affirmatively to proceed normally.

To download HyperBattleship! for OS9,  go to my blog here and then go to All Macintosh Software

Connecting to the Internet

While there are undoubtedly ways to connect the vintage AppleTalk network, I prefer to keep the vintage network off of the internet for the most part. There is still the need to be able to download software from the internet and ideally using only the network deliver the software to the G3, PM 5400, and IIGS when desired. Doing so requires temporarily connecting a more modern computer that is on my primary network to the vintage computer network.
Network diagram

To facilitate downloading programs for use on the IIGS, PM5400, and G3, there is a 2010 Mac Mini running MacOS X 10.13.6 "High Sierra" that is connected to my primary network via WiFi and is also connected to the new vintage network hub by Ethernet cable. Internet sourced content can then be delivered to the IIGS in three simple steps using nothing but net.

1. Mac Mini to G3 MacOS X 10.4 using Ethernet through the hub
2. G3 MacOS X 10.4 to PM5400 Mac OS 9 using Ethernet through the hub (this requires Mac OS 9 on the target computer.) (Note: 10.4 can do this over AppleTalk, but I am not certain about later versions.)
3. PM5400 Mac OS 9 to IIGS using AppleTalk

An alternative path not dependent on Mac OS 9 on the bridge PM5400 would be:
1. Mac Mini to G3 MacOS X 10.4 using Ethernet through the hub.
2. Reboot G3 to Mac OS 9.
3. G3 Mac OS 9 to PM5400 (Mac OS 7, 8, or 9) via AppleTalk
4. PM5400 (Mac OS 7, 8, or 9) to IIGS using AppleTalk

Transferring files from the Mac Mini to the G3

The Mac Mini is configured with MacOS X 10.13.6 "High Sierra". Newer versions of MacOS X may also work.

The Mac Mini is connected to my primary network via WiFi and is connected to the vintage network with an Ethernet cable from its Ethernet port to the same Ethernet hub being used for the G3 and PM5400.

While MacOS X 10.13 is not able to connect directly to Mac OS 9, it can connect directly to the G3 running MacOS X 10.4.

On the G3 in MacOS X 10.4 I have the following configured:
- In the Network preference pane, in the AppleTalk tab, "Make AppleTalk Active" is checked
- In the Sharing preference pane the computer name is set to "G3" and Personal File Sharing is turned on.

To transfer a file from the Mac Mini to the G3 I use the following steps:
1. Browse the Network using the Go > Network menu item
2. Click on G3 and connect as guest. This allows files to be dropped into the public Drop Box on my G3 user account.
3. Drag any files to transfer to the Drop Box folder.

(Configuration note: Because the Mac Mini is connected to both my primary network via WiFi and the vintage network via Ethernet, the WiFi connection is set in the Network Preference Pane to be used first and the Ethernet second. When in the reverse order access to the internet becomes non-functional.)

On the G3 the files will appear in the user Public/Drop Box folder.

Transferring files from the G3 running MacOS X 10.4 to the PM5400

1. Connect the G3 to the PM5400 running Mac OS 9 from the Go > Network menu item

2. Connect using the "G3" user name that has permissions on the PM5400

3. Select the shared folder on the PM5400 to be mounted

4. Once mounted the PM5400 folder will appear in the sidebar and the files can be copied from the Drop Box folder into it.

Questions

Q: Will this work with System 6 or earlier Macs?
A: No. Personal File Sharing was not added until System 7 of Mac OS.

Q: Will this work with an OS X (mac OS) computer?
A: An OS X computer that supports AppleTalk could be connected to the Ethernet hub (by Ethernet cable or WiFi) and it should work. However I have read that Apple dropped AppleTalk support in Mac OS X versions later than 10.2.8. Also the Mac OS X computer cannot run the LocalTalk Bridge control panel so it cannot serve as the AppleTalk/Ethernet bridge.

Q: Are the Farallon PhoneNet Plus Terminating Resistors really necessary?
A: The Farallon PhoneNet Plus manual says they are.  I am not an electrician and do not know if you risk harm done to the PhoneNet Plus adapters or the computers if you use the network without them.  The PhoneNet manual troubleshooting section implies that missing terminators can cause performance problems on the network.  My limited testing with just two computers connected to each other did not show any problems.

Q: How fast is an AppleTalk network for file transfers?
A: An AppleTalk network runs at 230.4 kps, which is pretty speedy for 1990 at an ideal 1 MB/minute. Copying files from my IIGS to the PM5400 typically performs at 2 minutes or less per MB.

Q: Why? Just why?
A: Because physical devices like 30 year old floppy drives will fail and without alternatives you may be unable to move files to and from your old computers, essentially freezing them in time.

Q: Is there any other way to accomplish this?
A: Probably.  There is an Ethernet card for the IIGS being sold currently (Uthernet II) and perhaps it would allow me to connect my IIGS to an Ethernet hub and eliminate the need for the Farallon PhoneNet Plus adapters and PM5400 to act like a bridge. There are also new ways to move files to a IIGS by using devices such as the FloppyEmu and BOOTi card which use SD and USB thumb drives, respectively.

Q: Will this work using emulators like Sheepshaver and KEGS?
A: I haven't tried using AppleTalk on emulators, though it would be an interesting thing to experiment with. From what I have read online additional 3rd party software may be required. I doubt I will pursue this myself.

Q: Why do your Mac dialog boxes look so cool?
A: On Mac OS 7-9 I use Kaleidoscope (available on Macintosh Garden here) along with my own "Corwin of Amber" scheme inspired by Roger Zelazny's Amber novels. The "Corwin of Amber" scheme is available on my blog under All Macintosh Software. Click here and go to All Macintosh Software.

Q: Where can I get the version of HyperBattleship! that works on OS9
A: Click here and go to All Macintosh Software
 

Sunday, May 10, 2020

"Copland" Inspired Apple IIGS Icons 2020

Having recently joined a few different vintage computing groups on Facebook, I found myself inspired to unbox my Apple IIGS and do some creative work with its Finder icons.  Creating icons for GS/OS is something I began doing in the mid-1990's. I created replacement icons for the Finder trashcan that were inspired by the Marvel superhero Ghost Rider and also created an entire set of replacement icons in a 3D style based on a picture spread in an Apple II magazine purporting to be of the upcoming release of the "Copland" version of the Mac OS 8 operating system. I thought it would be fitting if IIGS desktops had that look before Copland actually debuted (ironically Copland was abandoned and replaced by Rhapsody).

Here are some images from a July 1995 issue of MacUser showing some of Copland's 3-D icons:


Here is what an IIGS desktop using my icons looks like:

A display of a IIGS desktop using my Copland inspired icons

My 2020 additions include an "Apple II Forever" banner replacing the icons of Start.GS.OS and GS.OS, new icons for Finder, default device drivers, and a 3.5 drive icon. By coincidence I was on a video call the very day I completed these icons and Apple founder Steve Wozniak unexpectedly participated in the call. I used an image of my GS/OS desktop as my backdrop and can only hope that he saw them. (The two day conference sessions were recorded and will be posted at http://wwnc.online/presentations.html.)

In the IIGS section of my public Google Drive space I have a 2mg disk image of the 2020 icons that can be mounted on a IIGS emulator. There are also downloadable IIGS hard drive disk images with GS/OS 6.0.1 and my icons already installed.

Here are some pictures of the icons:




My Finder related icons with magnifying glasses, Apple II Forever, BASIC.LAUNCHER, and Finder icon inspired by the Apple standard icon.

My 1995 Copland inspired icons for many GS/OS folders


My Copland inspired icons for some common IIGS folders

Less common folders in the Copland inspired theme

My AppleDisk5.25, active/inactive SCSI, and AppleDisk3.5 driver icons

My trash can and disk drive icons installed in the Finder.Icns file

Many standard filetype icons with inactive versions

Copland inspired versions of folders typically found when attached to a Mac OS 8 fileserver

The desktop from my downloadable generic IIGS hard drive images

 

Saturday, May 2, 2020

How to Use Apple's iCloud Drive service for Cold Storage

What iCloud Drive Is and What It Is Not


Apple’s iCloud Drive service is designed to allow syncing of content from one or more devices - iOS, Mac, and Windows - to Apple owned storage over the internet and facilitate sharing of that content between devices with approved Apple IDs.  Applications such as Apple’s Notes, which exists on iOS devices and is included with MacOS (formerly called Mac OSX) work well with iCloud, allowing authoring and editing of the same notes across devices sharing the same Apple ID.

Documents can be stored in iCloud by application, as is done with the Notes and Photos apps. In addition though a person can purchase additional space in iCloud - either 200 GB or 2 TB - for a monthly fee and this purchased space is referred to as iCloud Drive and it can be accessed and managed through the web site https://www.icloud.com/iclouddrive/. If you turn on the Documents & Desktop feature in iCloud, the entire user Documents and Desktop folders will be uploaded to iCloud Drive and relocated on the local machine to a hidden folder within the user’s Home folder:

/Library/Mobile Documents/com~apple~CloudDocs

Because the data remains upon the local drive in the Mobile Documents folder, using iCloud Drive does not free up any space on the local hard drive.

Content that is synced with the iCloud Drive service is not only stored in iCloud and on the local hard drive of the original source, but is also synced to each authorized device. Because storage capacity on devices vary, Apple allows an optimization feature to be used so that older documents are retained only in iCloud and can be downloaded upon request to a client device, but users have no control over the algorithm that is used. Any data files that are manually uploaded to iCloud Drive using the www.icloud.com/iclouddrive/ website are also automatically pushed to each device that has the iCloud Drive service turned on.  This can become a problem for computers that lack the storage capacity on their internal drive.

The Need for Cold Cloud Storage


While Apple does not provide a means of marking content in iCloud Drive so that it is retained in iCloud Drive only, there are several reasons why this is a desirable feature.

MacOS expects home folders to be stored on the Mac internal drive. Home folders can be relocated to an external drive, but then the Time Machine service would not be able to back them up. Photo, music, and video libraries can take up an enormous amount of space, and unless these are also on the internal drive they cannot be backed up by Time Machine. Also, the BootCamp functionality requires partitioning the internal drive to create a Windows partition and because the partition size cannot be changed once created, it makes sense to create a larger partition than you expect to need, leaving less space on the internal drive for MacOS.

An external drive can be used to solve the problem of a large video library consuming a large amount of space, but once those videos are moved to the external drive they will be unable to be backed up by Time Machine so the loss of the external drive would mean the loss of the content.  For this reason it is essential that content put onto an external drive be backed up in some other way. Uploading these files to iCloud Drive would result in the files being pushed to the internal drive Mobile Documents folder, consuming all the internal space that was gained by moving the files to the external drive in the first place and is therefore not a viable solution. If your Photo library is larger than 200 GB then you will require the 2 TB iCloud Drive space. If you cannot upload additional content to that space due to limited local internal drive space, then much of that 2 TB may go unused.

Unfortunately Apple has positioned iCloud Drive as a sync and sharing file service, not a cold backup service and they have not provided a means to mark content in iCloud Drive to be retained in iCloud Drive only.

How to Achieve Cold Storage Using iCloud Drive


The following method to utilize iCloud Drive space for cold storage has been tested on Mac OS X 10.14.6 and is not supported by Apple. The author recommends that you utilize this method only for content that you retain a local copy of on an external drive or other local storage. This method utilizes the Unix underpinnings of Mac OS X and is therefore likely to continue to work unless Apple takes specific steps to disable it. Note that this method does not interfere with any other uses of iCloud Drive such as for Photo and Notes sync and the Documents & Desktop feature.

This solution works only with Mac OS X clients, so if you have iOS or Windows iCloud Drive clients enabled this solution is probably not for you.

Requirements

This method has the following requirements:

- More than one account on your Macintosh, preferably an admin account and your user account (the user account need not but can have admin privileges).

- Access to your iCloud Drive space via the web site https://www.icloud.com/iclouddrive/

- The administrator password (needed only if your own account does not have admin privileges)

- Access to the Terminal utility

- Access to all Macintoshes on which you have enabled iCloud Drive for your Apple ID

Steps to create a folder in iCloud Drive that can be used for cold storage


1. Access your iCloud Drive space at https://www.icloud.com/iclouddrive/

2. Create and name a new folder in iCloud Drive to be used for cold storage by clicking the website folder+ icon. You could create multiple folders if you like but it will reduce steps if you use subfolders within that one rather than creating multiple folders. In my case I created a single new folder named “Cloud-only”. Devices that the user is logged into and have iCloud Drive turned on will automatically have a corresponding folder created in their Library/Mobile Documents/com~apple~CloudDocs folder with the name of the new folder created in iCloud Drive.

3. On the Mac start the Terminal utility that is in the Applications Utilities folder.

4. Type “cd ~/Library/Mobile\ Documents/com~apple~CloudDocsand return (without the quotes)

5. Type “ls -lart” and return to list the contents of the com~apple~CloudDocs folder. This list should contain the name of the folder that had been created in iCloud Drive.

In my case the directory listing looks like this (bold added for emphasis):

bbellina$ ls -lart
total 16
drwxr-xr-x@ 51 bbellina  staff  1632 Apr 11 12:28 ..
-rw-r--r--@  1 bbellina  staff  6148 Apr 28 00:10 .DS_Store
drwxr-xr-x  12 bbellina  staff   384 Apr 28 13:45 .Trash
drwxr-xr-x   2 bbellina  staff    64 Apr 28 13:45 Cloud-only
drwxr-xr-x   5 bbellina  staff   160 Apr 28 13:45 .

 6. The trick to this technique is to alter the folder on the Mac so that attempts to push content into the folder by the iCloud Drive service using your account will fail. To do this you change the owner of the folder from your own account to another account on the Mac that is not used with iCloud Drive.  In my case I changed the owner to my administrator account "TheAdmin".  Type the following command, replacing "TheAdmin" with the account you choose and "Cloud-only" with the name of the folder you created in iCloud Drive:

sudo chown TheAdmin Cloud-only/

7. You will be prompted for a password and you should enter your administrator password. If your user account has admin privileges then your own password should suffice.

Password:

8. After this retype the ls -lart command to verify that the change was made. It should look something like this. Note that the Cloud-only folder is now owned by the theadmin account rather than bbellina:

bbellina$ ls -lart
total 24
drwxr-xr-x@ 51 bbellina  staff  1632 Apr 11 12:28 ..
drwxr-xr-x   5 bbellina  staff   160 Apr 28 13:45 .
-rw-r--r--@  1 bbellina  staff  8196 Apr 28 13:58 .DS_Store
drwxr-xr-x  14 bbellina  staff   448 Apr 28 15:23 .Trash
drwxr-xr-x   2 theadmin  staff    64 Apr 28 15:23 Cloud-only


9. Close the Terminal

With the owner of the folder changed, the iCloud Drive service will be unable to push updates to the folder therefore any content that you upload to the folder using the iCloud drive website will be unable to be pushed to your Mac.  If there are other Macs using the same Apple ID and iCloud Drive then you should change the owner of the folder on those Macs as well before uploading any content to the folder in iCloud Drive.

Conclusion

Since implementing this I have successfully uploaded over 50 GB of content into subfolders within my Cloud-only folder and none of the files have been pushed to my Mac’s internal drive. The files can still be downloaded at any time to my Mac by going to the iCloud website and selecting them for download.

A few current limitations in iCloud Drive to keep in mind. These may be changed in the future.

- There does not seem to be a way to rename folders using the iCloud Drive website

- A file uploaded to iCloud Drive cannot be larger than 10 GB

- The iCloud Drive web interface does not allow drag and drop upload for a folder, only files.

- Most importantly, do not rely entirely on iCloud Drive to be your master location for these files. I have already had situations in which all of the files have been removed and must be re-uploaded. iCloud Drive should NEVER be your sole storage solution.

- [Update 5/8/20] iCloud Drive cannot handle packages like the OS X Installers. A solution is to compress such packages and upload the resulting zip.

- [Update 5/24/20] This has been verified to work with macOS 10.13, 10.14, and 10.15

- [Update 5/24/20] [See above warning about iCloud Drive never being your sole location for storage. It is possible for this procedure to delete all of the files in your cold storage folder in iCloud Drive. It happened to me.] If iCloud Drive has already started downloading content from your Cloud storage only folder to your Mac (this can happen on a new Mac or when using Mac Recovery to reinstall the OS) you should delete that content from the Mac before using the chown command.  To do so disconnect from the internet to stop the download and then in Terminal cd into the directory with the content to delete and then issue the command "rm -R -i *" (without the quotes). Because of the -i option you will be asked to confirm each delete. If you are certain you are in the correct directory you can leave off the -i and it will delete everything without asking for confirmation.  Note that -R tells the rm command to remove all directories in the directory as well as files.

B. Bellina
5/1/20