The latest 0.9.3 update of Squirrel contains some changes in the way iCloud databases are handled. As a result, some users may have found that their database seemed to have been deleted. This post contains explanations about why this happens and how to restore your database.
iCloud in Mavericks
Starting with Mavericks, opening an iCloud enabled database is instantaneous, whereas it could take up to a few minutes before. The connection to iCloud happens in the background and data appears as it becomes available. This has the advantage to let you work while the database is being downloaded and reconstructed.
Because of this change, Squirrel 0.9.3 now stores its iCloud database in a different location, in order not to interfere with previous versions of Squirrel on the same computer. Hence, at first launch, the database will be loaded from iCloud in the background.
When downloading from iCloud, your database is being retreived as multiple transactions logs which represent successive edits you've performed in the past. Those logs are successibely being applied to a base store to get the latest version of your database. This can take up to a few minutes so it is important you give some time to Squirrel for this.
Problems can happen when those transaction logs are corrupted. If a corrupted transaction log is generated, the sync can stop accross all devices and databases cannot be retrieved from iCloud anymore. This is an issue we have been having for months, as iCloud is directly managed by OS X and iOS. Those corruption bugs rely in the system and we are dependent on Apple to fix them. That said, the stability of iCloud has considerably improved over the past months.
How to retrieve a database
If your database never gets downloaded and reconstructed from iCloud, here is how to retrieve it:
- Go to the Finder, and select "Go" > "Go to folder"…
- Copy the following URL: ~/Library/Mobile Documents/KGK6E7FS65~com~squirrelapp~squirrelmac/Documents/LocalData.nosync
You should see a file with a name composed by a single identifier followed by the .squirrel extenstion. If you have more than one file, choose the file with the lastest modification date.
- Copy this file to your desktop, and rename it to "Database.squirrelbackup".
- Launch Squirrel, and select File > Database > Restore…
- Select the backup file on your desktop and restore it
This database will then be sent to iCloud, and will be available to all your devices.