This is a very simple, yet effective way of backing up your Boostnote notes to a github repository. Follow these steps:
- Create a private github repository
- Find Boostnote storage directory on your computer and CD into it
- Create an empty repository by running
git init
- Add your github repository as the remote origin to your local repo
git remote add origin [email protected]:<your-user-name>/<your-repo-name>.git
- Push your repo
git push -u origin master
- Create a shell script file with the following content:
cd <your-boostnote-storage-location>
git add .
git commit -a -m "<Some message for your commit>"
git push
- Change shell command permission:
chmod 755 commit.sh
- Create a cronjob with your desire intervals by running
crontab -e
with the following content: (In this example, cronjob runs every 30 minutes, but you can change it however you want it to run)
*/30 * * * * <your-boostnote-storage-location>/commit.sh 1&>/dev/null