Vault migrator

在不同的物理后端之间迁移 vault 数据。「migrate vault data between different physical backends」

  • 所有者: nebtex/vault-migrator
  • 平台: Docker, Linux, Mac, Windows
  • 許可證: Apache License 2.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

vault migrator

GitHub release
Go Report Card

migrate or backup vault data between two physical backends. in one operation or in a cron job.

tested with: vault v0.7, consul, dynamodb

Warnings

  • Before you run this tool, make sure that you are not running vault in the destination backend

Usage

create a config.json file with this structure

{
  "to": {
    "name": "",
    "config": ""
  },
    "from": {
        "name": "",
        "config": "{"
    }
}

where from, is the source backend, and to is the destination

Examples:

remember only use strings in the backend config values!!!

  1. from dynamodb to consul
{
  "to": {
    "name": "consul",
      "config": {
        "address": "127.0.0.7:8500",
        "path": "vault",
        "token": "xxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
     }
  },
    "from": {
        "name": "dynamodb",
        "config": {
          "ha_enabled": "true",
          "table": "vault",
          "write_capacity": "1",
          "access_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
          "secret_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        }
    },
  "schedule": "@daily"
}

this will backup each 24 hours your data in dynamodb to a consul instance.

full list of storage backends and configuration options: Vault Storage Backends

schedule is optional if is not defined the command will run only once, for more documentation about is format please check robfig/cron

Binaries

Releases

OS X

curl -LO https://github.com/nebtex/vault-migrator/releases/download/$(curl -s https://raw.githubusercontent.com/nebtex/vault-migrator/master/stable.txt)/vault-migrator_darwin_amd64.zip

Linux

curl -LO https://github.com/nebtex/vault-migrator/releases/download/$(curl -s https://raw.githubusercontent.com/nebtex/vault-migrator/master/stable.txt)/vault-migrator_linux_amd64.zip

Windows

curl -LO https://github.com/nebtex/vault-migrator/releases/download/$(curl -s https://raw.githubusercontent.com/nebtex/vault-migrator/master/stable.txt)/vault-migrator_windows_amd64.zip

unzip and make the vault-migrator binary executable and move it to your PATH

full list of downloads for other platforms here

Usage

vault-migrator --config ${your_config_path}

Docker


Docker Pulls

linux amd64

docker pull nebtex/vault-migrator:$(curl -s https://raw.githubusercontent.com/nebtex/vault-migrator/master/stable.txt)

Usage

docker run -v ${your_config}:/etc/vault-migrator.json nebtex/vault-migrator

Contribution

To contribute to this project, see CONTRIBUTING.

Licensing

vault-migrator is licensed under the APACHE License v2. See LICENSE for the full license text.

主要指標

概覽
名稱與所有者nebtex/vault-migrator
主編程語言Go
編程語言Go (語言數: 3)
平台Docker, Linux, Mac, Windows
許可證Apache License 2.0
所有者活动
創建於2017-04-22 03:40:46
推送於2021-03-03 16:37:32
最后一次提交2017-12-27 01:12:09
發布數2
最新版本名稱v0.1.0 (發布於 )
第一版名稱latest (發布於 )
用户参与
星數53
關注者數7
派生數9
提交數29
已啟用問題?
問題數5
打開的問題數4
拉請求數2
打開的拉請求數2
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?