Backup Plugins to backup all obsidian files to Github, etc

Plugin Idea: Backup all files in obsidian to backup on Github, Google Drive, Dropbox, etc on a single click of a button.

7 Likes

Doesn’t OneDrive/Google Drive/etc. backup the folder and its contents seamlessly?

For Git, one need make a git command alias/function to add, commit, and push all at the same time. e.g.:

function lazygit() {
        git add .
        git commit -a -m "$1"
        git push
}

This is straightforward, and there are other ways around it, too.

However, I do not know how that could be implemented as an Obsidian plug-in (or invoked by some hotkeys).

Shouldn’t be hard (right?), and many would appreciate it if someone would give that a push! :relieved:

4 Likes

+1 on this idea!

If you have it stored in a Google Drive/OneDrive/Dropbox folder, it’s already set up to sync so you shouldn’t really need a plugin (like @psyguy mentioned).

With git, I’m doing this with GitHub now, but manually. You could set up a cron job (on Mac or Linux, maybe through Windows Linux subsystem), or Task Scheduler in Windows - but a plugin would be a smoother process. You could set the commits to be the date (optional time if it’s more than once a day) with a generic message like “2020-08-02: daily Obsidian sync” or similar. That’s not a great thing for code repos, but you could track changes easily as you make changes with all the .md files - along with your config changes and CSS if you use a theme.

With my setup, it’s pushed to a private repo so I have it all diff’ed and tracking all the changes along the way. This is helpful since I exported everything from Roam and redoing a lot of the tags vs. notes. It’s also nice if it’s kept up to date so I can read it on my phone in the GitHub app if I need to refer to something.

2 Likes

I’m doing the same for the past month. Manually pushing to my private repo. Will try to figure out how to use Mac Automator to do that, since I’m not planning on buying KeyboardMaestro.