{
  "format": "dockrun-bundle",
  "version": 1,
  "exportedAt": "2026-11-12T00:00:00Z",
  "workspaces": [],
  "workflows": [
    {
      "id": "D6E4A2EC-B420-5D32-B4F8-E8578A3AD3D2",
      "name": "Back up a folder",
      "summary": "Copies a folder to another place, such as an external drive. Nothing is deleted at the destination.",
      "variables": [
        {
          "name": "source",
          "defaultValue": "~/Documents",
          "summary": "The folder to back up"
        },
        {
          "name": "destination",
          "defaultValue": "/Volumes/Backup",
          "summary": "Where the copy goes"
        }
      ],
      "steps": [
        {
          "id": "8EFD7A71-960D-5CC4-BA31-889066F3B592",
          "actionID": "script.run",
          "input": {
            "language": "zsh",
            "code": "# Copies a folder into a destination folder (for example an external drive). New and changed files are copied;\n# nothing is deleted at the destination. Fails clearly when the drive isn't connected.\nall=\"$*\"\nsrc=\"${all%% :: *}\"; dst=\"${all##* :: }\"\nsrc=\"${src/#\\~/$HOME}\"; dst=\"${dst/#\\~/$HOME}\"\n[ -d \"$src\" ] || { echo \"No such folder to back up: $src\" >&2; exit 1 }\n[ -d \"$dst\" ] || { echo \"Destination not found: $dst. Is the drive connected?\" >&2; exit 1 }\ntarget=\"$dst/${src:t}\"\nmkdir -p \"$target\" || exit 1\nchanged=$(rsync -a --itemize-changes \"$src/\" \"$target/\" | grep -c '^>f')\necho \"Backed up $src to $target ($changed files copied)\"\n",
            "args": "{{var.source}} :: {{var.destination}}"
          },
          "condition": {
            "kind": "always"
          },
          "onFailure": "stop",
          "timeout": 1800,
          "isEnabled": true,
          "title": "Copy new and changed files"
        }
      ]
    }
  ]
}
