Argon - MongoDB 时光机 🚀
在你的 MongoDB 数据库中穿越时空。分支、还原和大胆实验,无需担心数据丢失。
什么是 Argon?
Argon 赋予 MongoDB 类 Git 分支与时光穿梭的超能力。可瞬间创建数据库分支,还原到历史上的任意时间点,数据永不丢失。
🎯 主要优势
- ⚡ 秒级分支 - 1 毫秒内克隆整个数据库(无需数小时)
- ⏰ 时光穿梭 - 以每秒 22 万+ 查询速度检索任意历史时刻的数据
- 🔄 安全还原 - 还原前可预览变更
- 💾 零存储成本 - 分支高效共享数据,压缩率高达 90%
- 🔌 即插即用 - 兼容现有 MongoDB 代码
- 🚀 企业级性能 - 最新优化后,时光查询快 26 倍
- ✅ 全面测试 - 覆盖广泛测试,确保可靠性
- 🗜️ 智能压缩 - 自动 WAL 压缩,节省 80-90% 存储空间
快速演示
# Install
brew install argon-lab/tap/argonctl # macOS
npm install -g argonctl # Cross-platformStep 1: Import your existing MongoDB (like "git clone")
argon import database --uri "mongodb://localhost:27017" --database myapp --project myapp
✅ Your data now has time travel capabilities!
Step 2: Use Argon like Git for your database
argon branches create test-env # Branch like "git checkout -b"
argon time-travel query --project myapp --branch main --lsn 1000Step 3: Disaster recovery made simple
argon restore preview --time "1 hour ago"
argon restore reset --time "before disaster"
类似 Git 的 MongoDB 工作流
🔄 步骤 1:导入(数据库的“git clone”)
# Bring your existing MongoDB into Argon
argon import preview --uri "mongodb://localhost:27017" --database myapp
argon import database --uri "mongodb://localhost:27017" --database myapp --project myapp
✅ Your existing data now has time travel capabilities!
🧪 步骤 2:分支("git checkout -b")
# Create branches for testing, staging, experiments
argon branches create staging --project myapp
argon branches create experiment-v2 --project myapp
Full database copies created instantly 🚀
📊 步骤 3:时光旅行(用于数据的 "git log")
# See your data's history
argon time-travel info --project myapp --branch main
argon time-travel query --project myapp --branch main --lsn 1000
Compare data across time like Git commits
🚨 步骤 4:恢复(灾难时使用 "git reset")
# "Someone deleted all users!"
argon restore reset --time "5 minutes ago"
Crisis averted in seconds, not hours
工作原理
Argon 拦截 MongoDB 操作并将其记录到预写日志(WAL),从而实现:
- 通过元数据指针实现即时分支
- 通过重放操作实现时光旅行
- 零拷贝高效性
ENABLE_WAL=true。安装
# CLI
brew install argon-lab/tap/argonctl # macOS
npm install -g argonctl # Node.js
pip install argon-mongodb # Python SDKFrom Source
git clone https://github.com/argon-lab/argon
cd argon/cli && go build -o argon
文档
社区
------ Tranlated By Open Ai Tx | Last indexed: 2025-07-21 ---