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 ---