Backup

The following options affect only the backup commands.

--directory-template <TEMPLATE>

Set the output directory template

ContextBackup Context
Default{{ now | date(format='%Y-%m-%d-%H%M%S') }}-{{ version }}
Example Output1970-01-01-120000-v0.1-0000

Note that an escaping backslash \ was required to nest a pipe | inside a markdown table. In other words, the default value does not contain a backslash.

For example, using the default template, the non-rendered ouput structure would look like the following:

[ouput-directory]
 └── {{ now | date(format='%Y-%m-%d-%H%M%S') }}-{{ version }}
      ├── AEAnnotation
      │   ├── AEAnnotation*.sqlite
      │   └── ...
      └── BKLibrary
          ├── BKLibrary*.sqlite
          └── ...

And when rendered, the ouput structure would result in the following:

[ouput-directory]
 └── 2022-10-09-152506-v4.4-5177
     ├── AEAnnotation
     │   ├── AEAnnotation_v10312011_1727_local.sqlite
     │   ├── AEAnnotation_v10312011_1727_local.sqlite-shm
     │   └── AEAnnotation_v10312011_1727_local.sqlite-wal
     └── BKLibrary
         ├── BKLibrary-1-091020131601.sqlite
         ├── BKLibrary-1-091020131601.sqlite-shm
         └── BKLibrary-1-091020131601.sqlite-wal

Backup Context

AttributeTypeDescription
nowdatetimethe current datetime
versionstringthe current version of Apple Books for macOS