-
Notifications
You must be signed in to change notification settings - Fork 1
Script backup plugin for holland
abg/holland-script
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A very simple backup plugin for holland that allows executing arbitrary scripts
This replaces a single variable called ${backupdir} with the actual
holland backup directory.
A command is considered as failed if it exits with non-zero status.
Note: This plugin currently returns a backup size estimate of 1 byte.
Example configuration:
[holland:backup]
plugin = script
[script]
shell = /bin/sh
estimation-method = const:64M
cmd = innobackupex-1.5.1 --stream=tar4ibd --slave-info /tmp > ${backupdir}/xtrabackup.tar.gz
More complex:
[holland:backup]
plugin = script
[script]
shell = /bin/bash
estimation-method = const:64M
# exit with mysqldump exit status rather than gzip's
cmd = mysqldump --all-databases | gzip --fast > ${backupdir}/all_databases.sql.gz; exit ${PIPESTATUS[0]}
Estimation method can be set to one of:
dir:<path> - e.g. dir:/var/lib/mysql
cmd:<cmdline> - e.g. echo 3.14159G
const:<constant> - e.g. 4G
Both cmd and const work with strings of the format:
N[.N][BKMGTPE]
If no units are specified the units are assumed to be bytes
4 = 4 bytes
4B = 4 bytes
4K = 4096 bytes
4M = 4194304 bytes
4G = 4294967296 bytes
4.5G = 4831838208.0 bytes
cmd should output a string matching this output and const should be a simple
string matching this output. Should that output not match this format the
estimation will fail and cause the backup to fail.
About
Script backup plugin for holland
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published