I use this setup. My notes folder is a git repo, I have a private repo on GitHub as backup. Then two moving parts.
a backup.sh script, which boils down to: `cd ${obfolder}; git add .; git commit -m "auto backup $(date +%Y%m%d%H%M%S)"; git push`. Give it a `chmod +x` and it's ready.
a crontab entry: `1 17 * * * ${obfolder}/backup.sh`, which is "at 5:01pm every day, run the backup script.
${obfolder} is the actual path of the vault directory and I haven't had to think about it in years.
a backup.sh script, which boils down to: `cd ${obfolder}; git add .; git commit -m "auto backup $(date +%Y%m%d%H%M%S)"; git push`. Give it a `chmod +x` and it's ready.
a crontab entry: `1 17 * * * ${obfolder}/backup.sh`, which is "at 5:01pm every day, run the backup script.
${obfolder} is the actual path of the vault directory and I haven't had to think about it in years.