-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
54 lines (36 loc) · 1.35 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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.