Utility program to backup changes in my Obsidian vault automatically using a git repository
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
| sync.ico | ||
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