Creates bookmark backups for the 'Brave' web browser.
- fork the repository
- create a private github repo named 'bookmarks'
- remove the existing 'bookmarks' submodule
- delete the existing submodule entry in the .gitmodules file
- add your private bookmarks repos as a submodule:
git submodule add [private repo url]
- enable submodule recurse in your git config:
git config --global submodule.recurse true
clone the repo to your home directoy with the name .brave-bookmarks
git clone https://github.com/austinwhite/brave-broswer-backup-bookmarks-file ~/.brave-bookmarks
Each time you clone your repo you'll need to re-initialize the submodule.
cd bookmarks
git submodule init
git submodule update
or clone with the --recurse
flag (enabling recurse in your gitconfig doesn't work for cloning).
Add a cron job to check for bookmark changes
crontab -l > mycron
echo "0 */3 * * * cd ~/.brave-bookmarks && ./backup check >/dev/null 2>&1" >> mycron
crontab mycron
rm mycron
git clone https://github.com/austinwhite/brave-broswer-backup-bookmarks-file ~/.brave-bookmarks
cd ~/.brave-bookmarks
setup
In order to automate the script, you'll need your git credentials persitently stored. Use your method of choice.
./backup [run-type]
run-type
- force: forces the creates of a bookmark backup
- check (default): creates a backup only if 'Bookmarks' has been modified since last backup
./restore
Gets the most recent backup and copies it to the brave bookmarks location on your system.