New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

borg-anchor

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

borg-anchor

Borg backups with Bitcoin timestamping - your data lives on forever

latest
Source
npmnpm
Version
0.0.7
Version published
Weekly downloads
63
57.5%
Maintainers
1
Weekly downloads
 
Created
Source

borg-anchor

npm version License: AGPL-3.0

Borg backups with Bitcoin timestamping. Your data lives on forever.

Overview

borg-anchor combines BorgBackup (deduplicating archiver) with Bitcoin timestamping to create backups with cryptographic proof of existence.

Your Data → Borg Backup → Bitcoin Anchor → Immortal Proof

Features

  • Deduplication - Only store changes, not duplicates
  • Compression - Efficient storage with lz4/zstd
  • Encryption - Optional AES-256 encryption
  • Bitcoin Timestamping - Immutable proof your backup existed
  • Chained Proofs - Each backup linked to previous via UTXO chain

Installation

npm install -g borg-anchor

Prerequisites

Quick Start

# Initialize a new backup repository
borg-anchor init ~/backups

# Configure your Bitcoin key
cd ~/backups
git config nostr.privkey <your-hex-privkey>

# Create your first backup
borg-anchor backup ~/mydata --name first-backup

# View all projects and backups
borg-anchor info

# List backups in current project
borg-anchor list

# Verify a backup is anchored
borg-anchor verify first-backup

# Restore a backup
borg-anchor restore first-backup /tmp/restore

Commands

CommandDescription
infoDashboard of all projects (CLI)
dashboardWeb dashboard (localhost:3077)
init [path]Initialize borg repo and config
backup <source>Create backup and anchor on Bitcoin
listList backups and trail status
verify <archive>Verify backup is anchored
restore <archive> [dest]Restore backup to destination
showShow config and trail status

Options

Init Options

OptionDefaultDescription
--repo <name>repoBorg repository directory name
--encryption <type>nonenone, repokey, repokey-blake2
--network <net>tbtc4btc (mainnet) or tbtc4 (testnet)

Backup Options

OptionDefaultDescription
--name <name>backup-YYYY-MM-DDArchive name
--no-anchor-Skip Bitcoin anchoring
--dry-Dry run (don't broadcast)

How It Works

  • Borg creates a deduplicated backup with a unique fingerprint (SHA-256)
  • The fingerprint is anchored on Bitcoin via a chained UTXO trail
  • Anyone can verify the backup existed at the anchored time
┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│ Your Files  │ ──▶ │ Borg Backup │ ──▶ │  Bitcoin TX │
│             │     │ fingerprint │     │  timestamp  │
└─────────────┘     └─────────────┘     └─────────────┘

Files

After initialization, your backup directory contains:

~/backups/
├── .borg-anchor.json   # Configuration
├── .blocktrail.json    # Bitcoin trail state
├── .git/               # Git repo (holds keys)
└── repo/               # Borg repository

Projects are also registered globally for the dashboard:

~/.borg-anchor/
└── projects.json       # List of all borg-anchor projects

Verification

To verify a backup:

# Get the fingerprint
borg info ~/backups/repo::my-backup | grep fingerprint

# Check it's anchored
borg-anchor verify my-backup

The fingerprint in your backup must match the fingerprint recorded on Bitcoin.

Networks

NetworkFlagUse Case
tbtc4--network tbtc4Testing (free, default)
btc--network btcProduction (real Bitcoin)

License

AGPL-3.0

Keywords

borg

FAQs

Package last updated on 04 Jan 2026

Related posts