SLV Backup - クイックスタート
🗄️ SLV Backup
SLV Backup は restic を使用して、ノードの暗号化インクリメンタルバックアップを作成します。すべてのデータはアップロード前にクライアント側で AES-256 により暗号化され、サーバーが平文データを見ることはありません。
レガシーモード: SLV は--resticなしの非暗号化 tar+zstd バックアップもサポートしています。新規バックアップにはすべて--resticの使用を強く推奨します。
前提条件
- 対象ノードに SLV CLI がインストール済み
sudoアクセス権(フルディスクバックアップに必要)slv loginでログイン済み、有効なストレージサブスクリプションがあることresticがインストール済み(apt install restic)
暗号化バックアップの作成
bash
sudo slv backup create --restic --yessudo slv backup create --restic --yestext
🗄️ SLV Backup (restic mode)
Region: default
Retention: 7 days
⚠️ Restic encryption password generated and saved to:
/home/solv/.slv/restic-password
BACK UP THIS FILE — without it, backups cannot be restored.
🔧 Initializing restic repository (if needed)...
📦 Creating restic backup...
Files: 151263 new, 0 changed, 0 unmodified
Dirs: 22486 new, 0 changed, 0 unmodified
Added to the repository: 4.107 GiB (1.837 GiB stored)
processed 151263 files, 4.366 GiB in 0:50
snapshot b6925e6d saved
✅ Restic backup complete
🧹 Applying retention policy (keep within 7 days)...
✅ Backup complete.🗄️ SLV Backup (restic mode)
Region: default
Retention: 7 days
⚠️ Restic encryption password generated and saved to:
/home/solv/.slv/restic-password
BACK UP THIS FILE — without it, backups cannot be restored.
🔧 Initializing restic repository (if needed)...
📦 Creating restic backup...
Files: 151263 new, 0 changed, 0 unmodified
Dirs: 22486 new, 0 changed, 0 unmodified
Added to the repository: 4.107 GiB (1.837 GiB stored)
processed 151263 files, 4.366 GiB in 0:50
snapshot b6925e6d saved
✅ Restic backup complete
🧹 Applying retention policy (keep within 7 days)...
✅ Backup complete.初回実行時の動作
- ランダムな暗号化パスワードが生成され、
~/.slv/restic-password(パーミッション 0600)に保存されます - ERPC Cloud Storage 上に restic リポジトリが初期化されます
- システム仮想ファイルシステムを除くディスク全体がバックアップされます
2回目以降の実行
変更されたファイルのみがアップロードされます(インクリメンタル)。重複排除によりストレージコストを低く抑えます。
バックアップの一覧表示
bash
sudo slv backup listsudo slv backup listrestic スナップショットとレガシー tar バックアップの両方をクラウドストレージから表示します。
バックアップからの復元
最新のスナップショットを復元:
bash
sudo slv backup restore latestsudo slv backup restore latest特定のスナップショットを復元:
bash
sudo slv backup restore b6925e6dsudo slv backup restore b6925e6dレガシー tar バックアップを復元:
bash
sudo slv backup restore backup-mynode-20260318.tar.zstsudo slv backup restore backup-mynode-20260318.tar.zstバックアップの整合性検証
bash
sudo restic -r rest:https://<apiKey>:[email protected]/v3/storage/restic/ \
--password-file ~/.slv/restic-password checksudo restic -r rest:https://<apiKey>:[email protected]/v3/storage/restic/ \
--password-file ~/.slv/restic-password check自動バックアップの設定(Cron)
bash
sudo slv backup create --restic --cron dailysudo slv backup create --restic --cron daily| 間隔 | 説明 |
|---|---|
daily | 1日1回実行 |
weekly | 週1回実行 |
monthly | 月1回実行 |
off | cron ジョブを削除 |
保持期間
デフォルトでは、7日より古いスナップショットは自動的に削除されます:
bash
sudo slv backup create --restic --retention 14sudo slv backup create --restic --retention 14除外パスのカスタマイズ
現在の除外リストを表示:
bash
slv backup create --list-excludesslv backup create --list-excludes除外パスを追加:
bash
sudo slv backup create --restic --exclude /home/solv/ledger --exclude /home/solv/snapshotssudo slv backup create --restic --exclude /home/solv/ledger --exclude /home/solv/snapshots暗号化とセキュリティ
| 機能 | 詳細 |
|---|---|
| 暗号化 | AES-256-CTR + Poly1305-AES(クライアント側) |
| 整合性 | SHA-256 コンテンツアドレッサブルストレージ |
| 重複排除 | コンテンツ定義チャンキング |
| サーバー側の可視性 | なし — サーバーは暗号化されたブロブのみを保持 |
| パスワードファイル | ~/.slv/restic-password(パーミッション 0600) |
| バックアップから除外 | ~/.slv/restic-password、~/.slv/api.yml、~/.slv/backup.env |
⚠️ 重要:~/.slv/restic-passwordファイルは別途バックアップしてください。このファイルがないと、バックアップは復元不可能になります。
オプションリファレンス
| オプション | 説明 |
|---|---|
--restic | restic による暗号化インクリメンタルバックアップを使用(推奨) |
-r, --region <region> | ストレージリージョン(デフォルト: eu) |
--exclude <path> | 追加の除外パス(複数指定可) |
--include <path> | デフォルト除外リストから削除(複数指定可) |
--list-excludes | 現在の除外リストを表示して終了 |
--retention <days> | N日より古いスナップショットを削除(デフォルト: 7) |
--cron <interval> | cron ジョブを設定(daily/weekly/monthly/off) |
-y, --yes | 確認プロンプトをスキップ |
--upload | レガシー: tar バックアップをクラウドストレージにアップロード |
-o, --output <path> | レガシー: tar バックアップの出力ファイルパス |
レガシーモード(tar+zstd)
後方互換性のため、非暗号化 tar バックアップも引き続きサポートされています:
bash
sudo slv backup create --upload --yes # 非暗号化 tar バックアップsudo slv backup create --upload --yes # 非暗号化 tar バックアップ注意: レガシーバックアップは暗号化されません。新規バックアップにはすべて--resticへの移行を推奨します。