Ok, I have now published my backup plugin with which I create my Joplin backups under Windows (But I hope it also runs under other operating systems).
The backups can be created manually or automatically by time interval.
If only one backup version is keeped, everything is stored in the backup folder.
If multiple versions are keeped, a date folder is created in which the backup is then stored.
What is backuped
Notebooks as JEX export (empty notbooks are not backed up)
When specifying backup path, the ability to browse for the path using Windows Explorer would be nice, but certainly not critical, and I guess that might be difficult to implement cross-platform?
For anyone wondering, the manual backup @JackGruber refers to is a menu option: Tools > Create Backup.
Just tried it in my test version of Joplin (portable) and I have this error at the end of the process
Backup error
Error: ENOENT: no such file or directory, copyfile 'J:/Joplin/JoplinProfile/keymap-desktop.json' -> 'U:\JoplinBackupAuto/202101161656/keymap-desktop.json'
Most likely because I didn't remap any keyboard shortcuts, so the file doesn't exist.
Other than that, it works perfectly.
Just tried this out and it is really useful. Thanks for the skill and time taken to create it!
Suggestions to possibly consider for any later versions:
Have an option to have an "Export All" single jex archive rather than just by notebook?
Reasoning: In the case of a full restore for users with many notebooks, importing each notebook one by one could be quite a task.
As the keymap file is backed up also backup userstyle.css and userchrome.css, if present, from .config\joplin-desktop as well?
Reasoning: These files could be heavily customised and may have been created over a long time and / or cut & paste from many sources. Recreating from scratch could be difficult / time-consuming.
userstyle.css and userchrome.css are added in version v0.3.0 of the plugin
I have added this option, but it should be considered, then only everything can be re-imported and not a single notbook in which you may have deleted a note.
v0.3.0 (2021-01-17)
Fix: Backup not only the last 50 notebooks
Add: Backup userchrome.css and userstyle.css
Add: Option to create single file JEX for all notebooks
What happens when you restore single JEX archive into your active use profile? Do all the notebooks in JEX get recreated? What happens if existing notebooks in your profile share the same names as notebooks in JEX?
Thanks for the very fast update! I was not expecting that.
The single jex export may not be suitable for some but my backups are essentially insurance against total loss or for when I scrub everything down (including the sync target) and start again in order to clear out too many "orphaned" files. Being able to dump everything back in in one go is a great benefit compared to doing it notebook by notebook.
Also having the css files included means that all the main customisation files can now be protected.
I can't thank you enough for doing this. It's a feature I have always wanted Joplin to have.
I am now having a look at your Note Overview plugin which seems to be an clever way of maintaining automatically updated saved searches.
There also other files like templates, css, keymap in this folder. This is why folders with timestamp are created.
For the plugins there is currently no possibility to get a close event. If this were possible, it could delay the termination extremely (For me, a backup takes about 9 minutes).
The option to create backup only when a newer change is done => Added to the list and I check it