Masahiro Hiramori131 downloadsCreate local ZIP backups of your vault with automatic retention management.
A local backup plugin for Obsidian that creates ZIP archives of your entire vault with automatic retention management.
Use the following variables in your filename template:
{{vault}}: Vault name (sanitized for filesystem){{date}}: Current date (default: YYYY-MM-DD){{date:FORMAT}}: Custom date format{{time}}: Current time (default: HHmmss){{time:FORMAT}}: Custom time format{{datetime}}: Date and time (default: YYYY-MM-DD_HHmmss){{datetime:FORMAT}}: Custom datetime formatExample: {{vault}}_{{datetime:YYYY-MM-DD_HHmmss}} → MyVault_2026-01-01_203015.zip
Configure how old backups are managed:
Set either value to 0 for unlimited retention in that dimension.
Access settings via Settings → Plugin Options → Vault Backup:
main.js, manifest.json, styles.css)<vault>/.obsidian/plugins/vault-backup/npm install to install dependenciesnpm run build to compilemain.js, manifest.json, and styles.css to your vault's plugin folder# Install dependencies
npm install
# Development mode (watch for changes)
npm run dev
# Production build
npm run build
# Lint code
npm run lint
# Bump version and release it to github
make release VERSION=0.1.0
src/
main.ts # Plugin entry point and lifecycle
settings.ts # Settings interface and UI
types.ts # TypeScript type definitions
backup.ts # Backup execution and concurrency control
zip.ts # ZIP file creation with atomic operations
template.ts # Filename template parsing
retention.ts # Backup retention management
ui/
backup-list-modal.ts # Backup list UI
<filename>.tmp.<random> in the backup folder.zip filenameThis approach ensures backups are never corrupted, even if the process is interrupted.
Only one backup can run at a time. If a backup is already in progress, additional requests are rejected with a notice.
Ensure the vault path exists and is accessible. Check the developer console (Cmd+Opt+I / Ctrl+Shift+I) for detailed error messages.
If temp files (.tmp.*) remain after a failed backup, they can be safely deleted manually.
Verify your retention settings and ensure the filename template matches existing backup files.
This plugin is licensed under the Apache-2.0 License.
If you find this plugin useful, consider supporting its development.