Backup Plugin

Thanks for the reply! Is the behavior of inadvertently deleting data a bug that is planned to be fixed?

No this is no bug, the behavior is desired.

1 Like

What is the reasoning behind this logic? Is there risk in the backup plugin removing existing backups in the directory?

Thanks!

Yes the Backup plugin removes old or no longer needed files

Do we know how it qualifies old or no longer needed files? This seems like strange behavior to me. I’m not sure I’m understanding why a backup tool would purge any files out of the specified directly.

I understand having a backup purge retention rate, but I’m not sure why any other files, such as documents, would be removed.

v1.1.1 (2022-07-27)

  • Fix: #45 Error message when deleting old ZIP backupsets
  • Disable Joplin DirectoryPath selector and use string input again because of several bugs #6692 and #6693
  • Fix: #40 Delete existing temporary zip file to prevent adding files to an old aborted backup

bump

How can I restore not all notes from a backup, but only the one that I accidentally deleted after creating a backup. Is it possible in Joplin or not? Maybe if the plugin does not allow you to do this, then you can do it in some other way?

You can restore the backup in a second Joplin instance or unpack the JEX file and search for the corresponding files.

There is also a Joplin internal command to restore a single note from the revision.

Firstly, thank you for developing the "Simple Backup" plugin for Joplin.
I have just begun using Joplin and found that creating backups using "Export all/JEX" was a little unsatisfactory. Adding your plugin provides all the additional features I hoped for.

Could you please consider developing another plugin to provide similar enhancements to the “Export all/MD” function.

Prior to adopting Joplin, I stored my notes as individual files in Markdown format contained in a structure of nested folders. The parent folder was synchronised to the cloud using OneDrive.
This has the advantage that I can view my notes from any location using any device. If no Markdown viewer is available, they are still readable as plain text.

I was disappointed to find that Joplin stores all data at a fixed location, in a single file of proprietary format. In future, I shall use Joplin to create new notes or edit existing notes. However, it is essential for me to maintain copies in the cloud in simple Markdown format. I can do this using “Export all/MD” but this provides only basic function and is not convenient to use.

My ideal plugin would be similar to “Simple Backup” with the following features:
• Set predefined local backup path
• Set backup interval
• Entry in Tools menu to initiate backup manually
• New files should overwrite previous files of the same name.
(Unlike the “Export all/MD” which creates duplicates using the “filename(1).md” convention.)
• If possible, new files should only be generated for notes which have been updated since the last backup. I realise that this is probably too difficult and it is certainly not essential.

As a newbie, I have no idea how many users would find this useful. You will be better able to judge whether it would be a worthwhile project.

I have the same issue. And I am on Fedora 35 (linux), Joplin 2.8.8, Simple Backup 1.1.1. I can't yet see any rhyme or reason for it. I will go weeks (months?) with everything working and then ... POOF! ... the path is removed from the configuration. Except for the POOF! only happens when the plugin finally notices. I just increased the backup interval to every hour instead of once a day to see if I can increase the odds I see the error in a timely fashion.

A mystery!

Submitted PR: Update README.md by ScriptInfra · Pull Request #46 · JackGruber/joplin-plugin-backup · GitHub

@t0dd there is a issue open on the GitHub page, but at the moment I have no idea where the problem is located.

2 Likes

v1.2.0 (2022-11-20)

  • Add: Option to select export format between JEX, MD with Frontmatter and RAW (Only supported with Joplin > 2.9.12)
  • Add: Command on Backup finish to execute a script/program when the backup is finished
3 Likes

v1.2.1 (2022-12-10)

  • Fix: #47 Suppress repeating error message during automatic execution if the backup path is not accessible
  • Fix: #48 File already exists when a RAW or MD Frontmatter backup with no revisions is made
3 Likes

I recently updated the plugin and changed the settings to enable a single JEX file. Now, after every backup I am getting:
"moveLogFile: ENOTDIR: not a directory, stat '/mnt/data/UserData/JoplinBackup/Auto/202212302210.7z/backup.log'"

The backup seems to create a zip archive just fine, but I'm just getting this error dialog after every backup run.

Could you please set the logging level to verbose and post the logfile ~\.config\joplin-desktop\cache\io.github.jackgruber.backup\backup.log after a backup run.

No such file exists there. Is this perhaps what's generating the error?

There is an activeBackup.log file there. I'm not sure that's relevant, but I took a look and saw nothing remarkable in that file and no errors.

Than post please the activeBackup.log

Here it is. Thanks for looking. Note that I replaced my home folder path with ~ in the below, for privacy:

[2022-12-31 22:05:05.131] [info] Backup started
[2022-12-31 22:05:05.133] [verbose] loadSettings
[2022-12-31 22:05:05.134] [verbose] loadBackupPath
[2022-12-31 22:05:05.138] [verbose] Plugin settings:
[2022-12-31 22:05:05.139] [verbose] path: /mnt/data/UserData/JoplinBackup/Auto
[2022-12-31 22:05:05.139] [verbose] singleJex: false
[2022-12-31 22:05:05.139] [verbose] singleJexV2: true
[2022-12-31 22:05:05.140] [verbose] backupRetention: 4
[2022-12-31 22:05:05.140] [verbose] backupInterval: 24
[2022-12-31 22:05:05.140] [verbose] onlyOnChange: false
[2022-12-31 22:05:05.141] [verbose] usePassword: false
[2022-12-31 22:05:05.141] [verbose] lastBackup: 1672462931978
[2022-12-31 22:05:05.141] [verbose] fileLogLevel: verbose
[2022-12-31 22:05:05.142] [verbose] zipArchive: yes
[2022-12-31 22:05:05.142] [verbose] compressionLevel: 9
[2022-12-31 22:05:05.142] [verbose] exportPath:
[2022-12-31 22:05:05.143] [verbose] backupSetName: {YYYYMMDDHHmm}
[2022-12-31 22:05:05.143] [verbose] backupInfo: [{"name":"202212292206.7z","date":1672376327219},{"name":"202212302210.7z","date":1672462931978}]
[2022-12-31 22:05:05.143] [verbose] backupVersion: 3
[2022-12-31 22:05:05.143] [verbose] backupPlugins: true
[2022-12-31 22:05:05.144] [verbose] createSubfolder: false
[2022-12-31 22:05:05.144] [verbose] createSubfolder: false
[2022-12-31 22:05:05.144] [verbose] exportFormat: jex
[2022-12-31 22:05:05.145] [verbose] activeBackupPath: /mnt/data/UserData/JoplinBackup/Auto/joplin_active_backup_job
[2022-12-31 22:05:05.145] [verbose] backupBasePath: /mnt/data/UserData/JoplinBackup/Auto
[2022-12-31 22:05:05.145] [verbose] logFile: ~/.config/joplin-desktop/cache/io.github.jackgruber.backup/activeBackup.log
[2022-12-31 22:05:05.145] [verbose] showDoneMsg: false
[2022-12-31 22:05:05.145] [verbose] installationDir: ~/.config/joplin-desktop/cache/io.github.jackgruber.backup
[2022-12-31 22:05:05.146] [info] Enable password protection: false
[2022-12-31 22:05:05.146] [verbose] Backup path: /mnt/data/UserData/JoplinBackup/Auto
[2022-12-31 22:05:05.146] [verbose] Active backup path (export path): /mnt/data/UserData/JoplinBackup/Auto/joplin_active_backup_job
[2022-12-31 22:05:05.146] [verbose] Create folder /mnt/data/UserData/JoplinBackup/Auto/joplin_active_backup_job
[2022-12-31 22:05:05.647] [info] Backup Profile Data
[2022-12-31 22:05:05.647] [verbose] Create folder /mnt/data/UserData/JoplinBackup/Auto/joplin_active_backup_job/profile
[2022-12-31 22:05:05.648] [verbose] Copy ~/.config/joplin-desktop/settings.json
[2022-12-31 22:05:05.665] [verbose] No file '~/.config/joplin-desktop/keymap-desktop.json
[2022-12-31 22:05:05.665] [verbose] No file '~/.config/joplin-desktop/userchrome.css
[2022-12-31 22:05:05.665] [verbose] Copy ~/.config/joplin-desktop/userstyle.css
[2022-12-31 22:05:05.687] [verbose] Copy ~/.config/joplin-desktop/plugins
[2022-12-31 22:05:05.710] [info] No templateDir, Joplin >= v2.2.5
[2022-12-31 22:05:05.710] [info] Select notebooks for export
[2022-12-31 22:05:05.713] [verbose] Add 'Welcome! (Desktop)' (e7d4b2fb8e954c07b508ec43917a9450)
[2022-12-31 22:05:05.713] [verbose] Add '2 File' (3a9b8f30c51a47a7a60af9a6d8125244)
[2022-12-31 22:05:05.713] [verbose] Add '1 Personal' (11a8ab682d92442985ebe779fcbbc9b1)
[2022-12-31 22:05:05.713] [verbose] Add '3 To Do' (d5be07c2ddb04ee8b9779b842e8a16a8)
[2022-12-31 22:05:05.713] [verbose] Add '4 Shared' (d93ba8345bee42fe9c6dcd3efe9a1d17)
[2022-12-31 22:05:05.713] [verbose] Add '5 Archive' (328ffa49bc204a26aec52e58c9f1272e)
[2022-12-31 22:05:05.714] [verbose] Add 'Templates' (1749c417d06347dfb05639ec198bb5bf)
[2022-12-31 22:05:05.714] [info] Create single file JEX backup
[2022-12-31 22:10:13.884] [info] Create zip archive
[2022-12-31 22:10:13.885] [verbose] Add /mnt/data/UserData/JoplinBackup/Auto/joplin_active_backup_job/* to zip /mnt/data/UserData/JoplinBackup/Auto/newJoplinBackup.7z
[2022-12-31 22:16:14.159] [info] Move finished backup
[2022-12-31 22:16:14.580] [verbose] deleteOldBackupSets
[2022-12-31 22:16:14.592] [info] Backup finished to: /mnt/data/UserData/JoplinBackup/Auto/202212312216.7z