Something I have never understood about preferences

There’s another way, FYI… This post may help.

Here’s an updated script to (in my case) include Cubase 15 in an automator-based preferences backup utility: You’ll need to change “YOURUSERNAME” to your username, and “YOURFOLDER” to a folder name in Documents you create to store your “rolling” backups.

Just open “Automator” and created a new automation job to Run Shell Script:

Where I’m showing the selected text, you’ll edit and paste in the below:

#!/bin/bash
set -euo pipefail

USER="/Users/YOURUSERNAME"

SOURCE1="${USER}/Library/Preferences/Cubase 15"

# Preset roots (under ~/Library so we can store relative paths cleanly)
PRESET_ROOT="${USER}/Library"
PRESET_DIRS=(
  "Audio/Presets"
  "Application Support/Steinberg/Track Presets"
)

DEST="${USER}/Documents/YOURFOLDER/Preferences"
mkdir -p "$DEST"

TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S")
HOSTNAME=$(scutil --get LocalHostName)

Zip1="${HOSTNAME}_C15_${TIMESTAMP}.zip"
Zip2="${HOSTNAME}_Presets_${TIMESTAMP}.zip"

zip_dir_if_exists () {
  local src_dir="$1"
  local out_zip="$2"
  if [ -d "$src_dir" ]; then
    ( cd "$src_dir" && zip -r -q "$DEST/$out_zip" ./* )
  fi
}

# Cubase prefs
zip_dir_if_exists "$SOURCE1" "$Zip1"

# Presets (zip relative to ~/Library so paths inside the zip are clean)
existing_presets=()
for rel in "${PRESET_DIRS[@]}"; do
  if [ -d "${PRESET_ROOT}/${rel}" ]; then
    existing_presets+=("$rel")
  fi
done

if [ "${#existing_presets[@]}" -gt 0 ]; then
  (
    cd "$PRESET_ROOT"
    zip -r -q "$DEST/$Zip2" "${existing_presets[@]}"
  )
fi

Then you can just save this entire job as an app and just run it. I have mine set in my Logon Items so every time I logon it creates a backup for me. I have a couple of months’ worth just in case I change something and want it back. It works wonderfully.

5 Likes