| backups | vibe coded | |
| backup_dotfiles.sh | vibe coded | |
| README.md | vibe coded | |
| restore_dotfiles.sh | vibe coded | |
🔒 Dotfiles Backup Utility 📦
This script creates encrypted backups of essential dotfiles, those hidden configuration companions that shape our digital gardens! It plucks scattered configuration files from their native habitats and bundles them together into a single, encrypted ball of tar.
The companion script restore_dotfiles.sh allows you to decrypt and extract these backups when needed.
🧰 Requirements
bashshell environmentrageencryption tool installed- Age identity file at
~/personal-information-management/identity/htl-r.age
🪴 What Gets Backed Up
The script preserves the following configuration files:
- Git configuration (
~/.gitconfig,~/.gitignore_htl) - Helix editor settings (
~/.config/helix/config.toml,~/.config/helix/languages.toml) - Nushell configuration (MacOS location:
~/Library/Application Support/nushell/config.nu,~/Library/Application Support/nushell/env.nu) - Zed editor settings (
~/.config/zed/settings.json) - PostgreSQL settings (
~/.psqlrc) - Sketchybar configuration (
~/.config/sketchybar/sketchybarrc) - Yabai window manager settings (
~/.yabairc)
🌿 Usage
Creating a Backup
Simply run the backup script from its directory:
./backup_dotfiles.sh
The backup script will:
- Create a timestamped backup file in the
backups/directory - Skip any files that don't exist (with a warning)
- Clean up after itself when done
The backup script will not:
- Love you the way you needed when you were young
- Fill the air with music
- Check in with your friends for you
Restoring from a Backup
To restore files from a backup:
./restore_dotfiles.sh backups/dotfiles_YYYY-MM-DD.age
The restore script will:
- Decrypt the backup file using your identity key
- Extract the files to a temporary directory
- Show you where the extracted files are located
- Provide commands to help you restore all files or individual ones
The restore script will not:
- Soften your cynical heart
- Remind you that all beings are connected
- Promenade gaily and/or dance merrily with you in the village square
🍄 How It Works
Backup Process
- Creates a temporary directory to gather the dotfiles
- Copies each dotfile into this temporary space, preserving directory structure
- Creates a compressed tarball of all files
- Encrypts the tarball using
rageand your identity file - Stores the encrypted file in
./backups/with a dated filename - Removes the temporary directory
Restore Process
- Creates a temporary directory for working with the encrypted backup
- Decrypts the
.agefile using your identity key - Extracts the tarball to a subdirectory within the temporary folder
- Provides clear instructions for restoring files
- Leaves the extracted files accessible for inspection until you manually remove them
🔖 Notes
If a configuration file is missing, the script will continue rather than failing—a practical adaptation to changing environments. Each backup creates a self-contained snapshot, like a pressed flower preserving a moment in your digital garden's evolution.
Hunter used bash to make this.