How to backup Obsidian
How to backup Obsidian with Git plugin
Since Obsidian files are local, it is important to back them up. The Git plugin is a free and general option compared to the official.
- Download the Git plugin in Obsidian (it is a third-party plugin so make sure you turn off the security mode).
- Download Git
- Create a repository in GitHub
- Initialize the local Obsidian vault (all codes run in Git terminal)
git init
- Add
origin
to the local Git repository(vault):git remote add origin https://github.com/your_username/your_repository_name/
- ‘Merge’ the local Git repository with the remote one:
git pull https://github.com/your_username/your_repository_name/ main --allow-unrelated-histories`
Note: the default branch name for GitHub repository is main, while the default branch name for local repository is master. This may cause errors. You can create a local branch named main.
git branch -M main
- Then the configuration is done. You can custom the
Vault backup interval
andAuto pull interval
in Obsidian Git plugin.
More see Obsidian-Git documentation (although I find it quite useless and unclear to beginners).
Now it is done!