This project provides a user-level backup solution built on BorgBackup, focused on automation for developer workstations. It performs hourly backups only during active user sessions, backing up your data while you work.
It uses GPG for encryption and pass for secret management, offering a headless and automated backup system for single-user workstations.
Note: This solution is tailored for single-user workstations and is not intended for server environments.
- Automated backups using BorgBackup
- GPG-encrypted archives with passphrase management
- Password store integration via
pass - Systemd service and timer for scheduled backups
- Automated setup and configuration
Run the install script to set up dependencies and configuration:
./install.shThe install script performs the following steps:
- Checks for required system packages (
pass,gnupg2,borgbackup,cifs-utils). - Creates a dedicated password store.
- Generates a new GPG key used for encrypting the password store and backup secrets.
- Prompts for and stores your SMB/CIFS credentials and the Borg repository passphrase in the password store.
- Installs the necessary scripts and systemd user units to automate the backup process.
- Configures
/etc/fstabto allow mounting the remote backup share without requiringsudoat runtime.
borg-backup backup
borg-backup ls [<archive>]
borg-backup rm <archive>
borg-backup restore <archive> <src> <dest>
borg-backup -h|--help[email protected]: Runs the backup for a user.[email protected]: Schedules hourly backups.[email protected]: Clears the cached GPG passphrase from thegpg-agenton session logout.
The install.sh script automatically enables and starts the required services and timers for the current user.
- Config files are stored in
~/.config/borg-backup/
- pass
- gnupg2
- borgbackup
- cifs-utils