Utility program to backup changes in my Obsidian vault automatically using a git repository
Go to file
2025-03-22 12:43:22 +01:00
src Silence git command output to prevent cmd window to spawn 2025-03-22 12:43:22 +01:00
.gitignore Implement file change watching and tray menu to trigger backup 2025-01-30 23:15:01 +01:00
Cargo.lock Replaced git2 crate add to index, commit and push with calls to git cli and changed delay to 30 min 2025-03-14 09:05:20 +01:00
Cargo.toml Replaced git2 crate add to index, commit and push with calls to git cli and changed delay to 30 min 2025-03-14 09:05:20 +01:00
README.md Replaced git2 crate add to index, commit and push with calls to git cli and changed delay to 30 min 2025-03-14 09:05:20 +01:00
sync.ico Implement file change watching and tray menu to trigger backup 2025-01-30 23:15:01 +01:00

Obsidian Git Backup

This script automates the process of backing up your Obsidian vault to a Git repository. It ensures that all changes are tracked automatically and can be easily restored if needed.

Features

  • Trigger backup after file changes with delay
  • Maintain git repo in a seperate folder to not have the repo synced by syncthing (copy changed files over)
  • Push changes to remote repository
    • Make adding and pushing LFS objects work with git
  • Tray Menu
    • Exit
    • Backup now
    • See current changed files
    • See time after last file change
  • Easy configuration of paths and delay

Installation

  • Create target repo folder and initialize an empty git repository
  • Set up git lfs for attachments
    • $ git lfs install
    • .gitattributes
      *.pdf filter=lfs diff=lfs merge=lfs -text
      *.png filter=lfs diff=lfs merge=lfs -text
      *.jpg filter=lfs diff=lfs merge=lfs -text
      *.jpeg filter=lfs diff=lfs merge=lfs -text
      *.webp filter=lfs diff=lfs merge=lfs -text
      *.avif filter=lfs diff=lfs merge=lfs -text
      *.svg filter=lfs diff=lfs merge=lfs -text
      
  • Link repository to origin as remote
  • Make sure the underlying system has the git user set up with the corresponding access token