1 Star 0 Fork 0

wzb / wal-g

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
FoundationDB.md 1.72 KB
一键复制 编辑 原始数据 按行查看 历史

WAL-G for FoundationDB

Work in progress

You can use wal-g as a tool for encrypting, compressing FoundationDB backups and push/fetch them to/from storage.

Development

Installing

To compile and build the binary for FoundationDB:

Optional:

  • To build with libsodium, just set USE_LIBSODIUM environment variable.
  • To build with lzo decompressor, just set USE_LZO environment variable.
go get github.com/wal-g/wal-g
cd $GOPATH/src/github.com/wal-g/wal-g
make install
make deps
make fdb_build

Users can also install WAL-G by using make install. Specifying the GOBIN environment variable before installing allows the user to specify the installation location. On default, make install puts the compiled binary in go/bin.

export GOBIN=/usr/local/bin
cd $GOPATH/src/github.com/wal-g/wal-g
make install
make deps
make fdb_install

Usage

  • backup-fetch

Command for sending backup from storage to stream in order to restore it in the database.

wal-g backup-fetch example_backup

Variable WALG_STREAM_RESTORE_COMMAND is required for use backup-fetch (eg. TMP_DIR=$(mktemp -d) && chmod 777 $TMP_DIR && tar -xf - -C $TMP_DIR && BACKUP_DIR=$(find $TMP_DIR -mindepth 1 -print -quit) && fdbrestore start -r file://$BACKUP_DIR -w --dest_cluster_file "/etc/foundationdb/fdb.cluster" 1>&2)

WAL-G can also fetch the latest backup using:

wal-g backup-fetch LATEST
  • backup-push

Command for compressing, encrypting and sending backup from stream to storage.

wal-g backup-push

Variable WALG_STREAM_CREATE_COMMAND is required for use backup-push (eg. TMP_DIR=$(mktemp -d) && chmod 777 $TMP_DIR && fdbbackup start -d file://$TMP_DIR -w 1>&2 && tar -c -C $TMP_DIR .)

1
https://gitee.com/camel_tj/wal-g.git
git@gitee.com:camel_tj/wal-g.git
camel_tj
wal-g
wal-g
master

搜索帮助