[CLI] storage of notes

Operating system

Linux

Joplin version

2.13.2

What issue do you have?

As I understand the notes are stored in .config/joplin/database.sqlite

Why are they still kept there if I Remove them from my CLI application?

The following two settings (from joplin-cli help config) should be relevant here:

revisionService.enabled        Enable note history.
                               Type: bool.
                               Default: true
                              
revisionService.ttlDays        Keep note history for.
                               Type: int.
                               Default: 90

By default, note history is enabled (I'm not sure if there's a way to access previous note versions from CLI...).

Changing the revisionService.ttlDays setting should change how long deleted notes and resources are kept. (For resources, this is even if note history is disabled).

okay, how do I disable note history?

First make a backup of (undeleted) notes:

joplin-cli export --format="jex" ./backup.jex

Next,

  • joplin-cli config revisionService.ttlDays 1 (delete revisions and unlinked resources after 1 day)
    • I think that the minimum is 1
  • joplin-cli config revisionService.enabled false (disable revisions)

should work.

After restarting the app, old revisions (deleted more than a day ago) should be deleted after four or so seconds:

Unlinked resources will be deleted after slightly longer:

1 Like

Are all these settings saved in .config/joplin? If I want to migrate to another device I just need to backup my .config/joplin dir and move it to .config/joplin on my new device right?

Am I right?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.