Projects & Experience

Backup dotfiles with lockbook on macos

Lockbook is a blazingly fast note taking application written in rust. We can store compressed and encrypted text files in lockbook’s cloud on the free tier. Lockbook’s CLI supports automatic file syncronization similar to Google Drive.

In this post, I’ll show how I back up my nvchad custom config (docs). This symlink strategy can be used to backup any configs or other text data automatically.

Setting up the lockbook CLI

First install lockbook version >= 0.9.0

The lockbook fs command

Automatically syncs your entire lockbook with a localhost NFS drive in /tmp/lockbook

Back up our dotfiles

Please note, this guide will replace your existing directory with a symlink. It’s highly recommended to backup the existing directory before proceeding to avoid losing configurations.

Copy dotfiles to /tmp/lockbook

Create the symlink

Verify the symlink

Look for the custom entry in the output. It should indicate that it is a symlink (l at the beginning of the permissions string) and point to your target directory /tmp/lockbook/dotfiles/nvchad-config.