Sathindu3k downloadsVault synchronization and scheduled backups across devices using S3-compatible storage (AWS S3, Cloudflare R2, RustFS, etc.) with optional end-to-end encryption.
Vault synchronization and scheduled backups across devices using S3-compatible storage (AWS S3, Cloudflare R2, Backblaze B2, RustFS, etc.) with optional end-to-end encryption.
LOCAL_ and REMOTE_ copies so you never lose data.main.js, manifest.json, and styles.css from the latest release.<VaultPath>/.obsidian/plugins/simple-storage-sync-and-backup/https://s3.<REGION>.backblazeb2.com for Backblaze B2).us-east-1, and Cloudflare R2 starts with auto. Choose the region your bucket or server uses. Backblaze B2 fills the region from a standard endpoint such as https://s3.us-west-004.backblazeb2.com. You can also enter it manually. For other S3-compatible services, use the region specified by the service.vault) — this is the S3 folder where your files live.backups).⚠️ Important: If you enable encryption, you MUST remember your passphrase. There is no recovery if it is lost.
When encryption is enabled:
The plugin uses Obsidian’s vault index to discover local files for sync and backup. You can narrow that scope in Settings → Advanced → Exclude patterns.
| API | Why the plugin uses it |
|---|---|
vault.getFiles() |
Lists the files in Obsidian’s vault index during sync planning and backup snapshots. The index omits files in hidden folders. |
vault.read() / vault.readBinary() |
Reads the content of indexed files in scope so it can be uploaded to S3. |
vault.on('create' / 'modify' / 'delete' / 'rename') |
Tracks which files changed since the last sync so the next cycle only re-checks dirty paths. |
| Bulk re-read on encryption toggle | When you enable, disable, or rotate the passphrase, the plugin reads every in-scope vault file and re-uploads it in the new payload format. |
| Destination | What ends up there |
|---|---|
S3 (under your configured sync prefix, default vault) |
A copy of every vault file inside the sync scope. File payloads are end-to-end encrypted when Enable encryption is on; plain otherwise. |
S3 (under your configured backup prefix, default backups) |
Timestamped snapshots of in-scope vault files. File payloads are encrypted when encryption is enabled; the per-snapshot .backup-manifest.json is always plaintext so the plugin can list and inspect backups without the passphrase (it contains file paths, sizes, SHA-256 checksums, the encryption flag, and the originating device ID). |
Local vault (vault.create / vault.modify / vault.createBinary / vault.modifyBinary / vault.rename / vault.createFolder) |
Files downloaded from S3 on the receiving end of a sync, plus LOCAL_* / REMOTE_* conflict artifacts when a file diverged on two devices. Parent folders are auto-created top-down as needed; the rename API is used to stage LOCAL_* conflict copies. |
Local vault trash (via fileManager.trashFile) |
Files that were deleted on another device and propagated by sync. Honours Obsidian's Files and Links → Deleted files preference (system trash vs. .trash/ folder vs. permanent). |
IndexedDB (database obsidian-s3-sync-journal-{vaultName}) |
Per-file sync baselines (path, hash, size, mtime, ETag) used for three-way reconciliation, plus a destination fingerprint that detects when you reconnect to a different bucket/prefix. Vault-scoped so two vaults on the same device never share state. |
Obsidian vault-scoped storage (key s3-sync-device-id) |
A randomly generated per-vault device identifier. The same ID is written into every uploaded S3 object's obsidian-device-id custom metadata for last-writer attribution, and into the deviceId field of every backup manifest. |
data.json (Obsidian plugin settings) |
All plugin settings (secret names for the S3 credentials, sync/backup toggles, exclude patterns) plus the last-completed backup timestamp used by the scheduler. Secret values are never written here. The vault configuration folder stays local, including this file. |
http://localhost:9000 for a local RustFS).The vault configuration folder, usually .obsidian/, stays local and is outside sync and backup. This also applies when you override the folder in Obsidian. Workspace layouts, enabled plugins and plugin settings can differ across devices. Keeping them local prevents one device’s settings from replacing another’s. Obsidian Vault API · Configuration folders
On Obsidian 1.13.0 and later, use Settings search to find plugin options such as sync on startup, retention copies, or the encryption passphrase controls.
| Setting | Description |
|---|---|
| Provider | Storage provider: AWS S3, Cloudflare R2, Backblaze B2, RustFS, or Other S3-compatible. |
| Endpoint URL | S3-compatible endpoint URL. Required for non-AWS providers (e.g., https://<ACCOUNT_ID>.r2.cloudflarestorage.com for R2, https://s3.<REGION>.backblazeb2.com for Backblaze B2, http://localhost:9000 for RustFS). Hidden when provider is AWS. |
| Region | Editable region for the selected provider. New AWS S3 and RustFS connections start with us-east-1, and Cloudflare R2 starts with auto. Backblaze B2 can fill the region from its endpoint. Other S3-compatible services use their own region setting. |
| Bucket | Name of your S3 bucket. |
| Access key ID | Secret (from Obsidian's secret storage) holding your S3 access key ID. |
| Secret access key | Secret (from Obsidian's secret storage) holding your S3 secret access key. |
| Force path style | Use path-style URLs instead of virtual-hosted. Required for some self-hosted S3-compatible endpoints. Only shown for the Other S3-compatible provider — AWS, R2, B2, and RustFS each pin a fixed addressing mode internally. |
| Test connection | Check the displayed connection's credentials and bucket access without saving. |
| Save connection | Apply the displayed connection after current syncs, backups, and ZIP exports finish. |
| Discard changes | Restore the saved connection. |
| Setting | Description |
|---|---|
| Enable end-to-end encryption | Encrypt all files with XSalsa20-Poly1305 before uploading to S3. Requires a passphrase (minimum 8 characters). Shows a strength indicator while typing. |
| Remember passphrase | Save the passphrase in Obsidian's Keychain to unlock automatically on startup. If the vault is already unlocked, enter the current passphrase when prompted. |
| Unlock | When the vault is encrypted but locked (e.g., after restarting Obsidian without "Remember passphrase"), enter your passphrase to unlock sync and backup. |
| Disable encryption | Re-upload all files as plaintext and remove the encryption marker. Shows a confirmation dialog. Other devices switch to plaintext mode automatically on next sync. |
| Setting | Description | Default |
|---|---|---|
| Enable sync | Master switch for bi-directional vault synchronization. | On |
| Sync prefix | S3 folder path for synced files (e.g., vault → s3://bucket/vault/). |
vault |
| Auto-sync | Automatically sync at regular intervals. | On |
| Sync interval | How often to auto-sync. Options: 1, 2, 5, 10, 15, or 30 minutes. Only shown when auto-sync is enabled. | 5 min |
| Sync on startup | Run a sync immediately when Obsidian starts. | On |
| Setting | Description | Default |
|---|---|---|
| Enable backups | Master switch for scheduled vault backup snapshots. | On |
| Backup prefix | S3 folder path for backups (e.g., backups → s3://bucket/backups/). |
backups |
| Backup interval | How often to create snapshots. Options: every hour, 6 hours, 12 hours, daily, every 3 days, or weekly. | Daily |
| Enable retention | Automatically delete old backups after saving a new snapshot. If cleanup fails, the new snapshot remains available and the plugin reports the cleanup error. | Off |
| Retention mode | How to determine which backups to keep: By days (delete backups older than N days) or By copies (keep only the latest N backups). Only shown when retention is enabled. | By copies |
| Retention days | Delete backups older than this many days (1–360). Only shown in "By days" mode. | 30 |
| Retention copies | Keep only the latest N backups (1–1000). Only shown in "By copies" mode. | 30 |
| Backup now | Create a backup snapshot immediately. | |
| View backups | Open a modal listing the 5 most recent backups with per-backup download buttons. Each entry shows timestamp, file count, size, and encryption status. |
| Setting | Description | Default |
|---|---|---|
| Debug logging | Enable verbose console logging for troubleshooting. | Off |
| Exclude patterns | Comma-separated vault-relative file paths and glob patterns to skip during sync and backup. | **/workspace*, .trash/** |
| Reset to defaults | Reset all settings to defaults, preserving S3 connection credentials. Shows a confirmation dialog. |
Enter vault-relative paths in Settings → Advanced → Exclude patterns. Use forward slashes and separate entries with commas.
Private/Journal.md skips one note.Archive/** skips the contents of Archive, including subfolders.*.canvas, **/*.canvas skips Canvas files at the vault root and in subfolders.Matching files are skipped during sync in both directions and in future snapshots. Adding a pattern leaves existing S3 objects and snapshots in place.
All commands are available via the Obsidian command palette (Ctrl/Cmd + P) and can be bound to custom hotkeys.
| Command | Description |
|---|---|
| S3 Sync + Backup: Sync now | Trigger an immediate sync. |
| S3 Sync + Backup: Backup now | Trigger an immediate backup snapshot. |
| S3 Sync + Backup: Pause sync | Pause automatic sync (shown only when sync and auto-sync are enabled). |
| S3 Sync + Backup: Resume sync | Resume automatic sync after pausing. |
| S3 Sync + Backup: View sync log | Open the sync log viewer. |
| S3 Sync + Backup: View backups | Open a modal listing recent backups with download buttons. |
| S3 Sync + Backup: Open settings | Open the plugin settings page. |
This plugin is designed for multi-device use. Each device gets a unique ID on first run, and all S3 uploads are tagged with the writing device's ID.
How it works:
LOCAL_ and REMOTE_ copies of the file.Encryption across devices:
your-bucket/
├── vault/ # LIVE DATA (synced)
│ ├── .obsidian-s3-sync/
│ │ └── .vault.enc # Encryption marker (if enabled)
│ ├── Notes/
│ │ └── my-note.md
│ └── Attachments/
│ └── image.png
│
└── backups/ # SNAPSHOTS (read-only)
├── backup-2024-12-25T14-30-00/
│ ├── .backup-manifest.json # Plain JSON: file count, checksums, encrypted flag
│ └── ... (in-scope vault files)
└── backup-2024-12-24T14-30-00/
data.json to Obsidian's Keychain. It removes the legacy values after the replacement secrets can be read. Startup sync and catch-up backup wait for the encryption check and unlock. On a new device, add or select the S3 secrets in that device's Keychain and enter the passphrase. Obsidian has no secret deletion API, so cleared secrets remain as empty entries.The plugin includes 565+ automated tests: unit tests covering sync, encryption, backup, and utility modules, pipeline end-to-end tests, and integration tests against live S3 endpoints. CI runs linting, type-checking, and the full test suite on every pull request.
LOCAL_ and REMOTE_ copies. The conflict resolves on the next sync.
.backup-manifest.json) is always plain JSON so the plugin can read backup metadata, but it contains only file names, checksums, and the encrypted flag — no file content.
**/workspace* and .trash/**. For other vault files, see the exclude pattern examples.
MIT © Sathindu
Made with love for the Obsidian community