Sunday, 17 April 2011

Upgrading the On-Disk Structure of my mail file using Lotus Notes 8.5.3 on Mac OSX

 For various reasons, I wanted to upgrade the On-Disk Structure (ODS) of my mail file, using Notes 8.5.3 on Mac OSX.
I've done this in the past, using Ubuntu Linux, as per my external blog here, but hadn't done it on the Mac before.
Previously, the ODS of the file was 43 whereas Notes 8.5.X supports  51.
The upgrade can be forced, using the Compact tool ( ncompact.exe on Windows, NotesCompact on Mac ), but there is a necessary preceding step.

It's necessary to add the parameter: -
to the notes.ini file.

However, on the Mac, this file isn't in the normal place, but instead is here: -
~/Library/Preferences//Notes Preferences

so, in my case, it's located here: -
/Users/david_hay/Library/Preferences//Notes Preferences
The easiest way to edit this, apart from using vi via the Terminal application, is to open Finder, and then use the "magic" key sequence of [Shift] + [CMD] + [G] to bring up the "Go to folder' dialogue, and enter the folder ~/Library/Preferences and then look for Notes Preferences.

Select the file, and then choose Open With -> TextEdit.
Having found and edited the file, add: -

to the end of the file, and save it.
Before performing the Compact, I needed to quit Notes to ensure that my mail file wasn't locked.
It's now necessary to open the Terminal application, and navigate to /Applications/
Ordinarily, one would execute the NotesCompact application from here, but doing so generates the error: -

dyld: Library not loaded: @executable_path/libnotes.dylib
  Referenced from: /Applications/
  Reason: image not found
Trace/BPT trap
The simplest solution is to copy the NotesCompact application to the parent directory: -
cp NotesCompact ..

and then execute it from there: -
cd ..
./NotesCompact GBHX9675.NSF -C
( note that I've specifically included my mail file database and the -C option - if I omit the database name, NotesCompact wil run across all the databases in my data directory ).
As an example, here's the output from the command on my machine: -

./NotesCompact GBHX9675.NSF -C[B483:0002-A04B1540] The ID file being used is: /Users/david_hay/Library/Application Support/Lotus Notes Data/
[B483:0002-A04B1540] Enter password (press the Esc key to abort):

[B483:0005-B0150000] 17/04/2011 16:42:10   Informational, database design compression is enabled in database GBHX9675.NSF.
[B483:0005-B0150000] 17/04/2011 16:42:11   Informational, LZ1 is enabled in database GBHX9675.NSF.
[B483:0005-B0150000] 17/04/2011 16:42:11   Compacting GBHX9675.NSF (Dave Hay),  GBHX9675.NSF -C
[B483:0005-B0150000] 17/04/2011 16:42:21   Compacted  GBHX9675.NSF, 0K bytes recovered (0%)
[B483:0002-A04B1540] 17/04/2011 16:42:22   Database compactor process shutdown
( Note that I had already run it a few times, so there was nothing to recover ! )
As a result, my mail file is now running on the latest ODS level ( 51 ), as evidenced by File -> Application -> Properties, and it's also shrunk in the wash :-) from 109 MB to 86 MB, which is nice.

No comments: