/obsidian-local-backup

Automatically creates a local backup of the vault.

Primary LanguageTypeScriptMIT LicenseMIT

Local Backup

GitHub Github all releases GitLab latest release CodeQL

Automatically creates a local backup of the vault.

Features

  • Backup on startup
  • Setup backups' lifecycle
  • Customize output path
  • Interval backups
  • Backup by calling archiver

How to use

Setup the plugin

General Settings

general-settings

Hints
  1. Setup the output path depends on your computer platform.
  2. Setup the Windows and Unix output path while you using these two platforms.

If you turn on interval backups, it is recommended to set a reasonable bakcup frequency, e.g. >=10min, this plugin costs CPU resources and Disk I/O resources, backup frequently might cause lagging.

File Archiver Settings (Optional)

file-archiver-settings

Hints
  1. (Experimental) If you have a large size vault and Obsidian stucks on backing up, please try the experimental feature in setting page.

For user who owns a vault with large size, it is recommended to turn on Backup by calling external file archiver in setting page, the experimental feature of the latest version, then setup the rest of settings of archiver.

Run a local backup command

Command panel

Enter the command panel using Ctrl + P.

run-command

Sidebar icon

Click the sidebar icon.

sidebar-icon

Installation

Install from plugin store

  • Search Local Backup at Obsidian Community Plugins and install it.
  • Enable Local Backup.
  • Setup Local Backup.
  • Apply settings or restart Obsidian.
  • Enjoy! 🎉

Manually installing the plugin

  • Copy over main.js, styles.css, manifest.json to your vault VaultFolder/.obsidian/plugins/your-plugin-id/.
  • Open Obsidian and enable Local Backup.
  • Follow the guiding above.

Contributing

Build

  • Clone this repo.
  • Make sure your NodeJS is at least v16 (node --version).
  • npm i or yarn to install dependencies.
  • npm run dev to start compilation in watch mode.
  • npm run build to build the main.js in ./build.

Todo

  • Backup on startup.
  • Archive the backup dictionary to save disk memory.
  • Customize the backup lifecycle.
  • Customize the backup storage path.
  • Add a command to create a backup.
  • Add interval backup.
  • Backup by calling archiver, eg. 7-Zip.

Reference

License

Obsidian Local Backup is licensed under the MIT license. Refer to LICENSE for more information.