-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.example.js
129 lines (100 loc) · 3.07 KB
/
config.example.js
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
const path = require('path');
// Include private.js with all authentications (see private template)
const private = require('./private');
module.exports = {
// Enable basic log on stdout
verbose: false,
// Backup directory path
// If you run "npm installService" make sure user "backmeup" has read and write access to this directory
backup_dir: path.join(__dirname, 'backup'),
// Working directory on remote server
tmp_dir: '/tmp/backMeUp',
// Every type of backup must be defined inside this object
// Backup are stored in <backup_dir>/<backup_name>/<backup_name>_<timestamp>.tar.gz
// backup_name is the key inside this object
backups: {
// SQL backup example
// Run sqldump on specified database
// Remote host must have sqldump command
sql_example: {
// Required.
// SSH auth (see private template)
host: private.my_remote_machine.ssh,
// Required.
// Backup type
type: 'sql',
// Required for sql.
// Database name
database: 'shop',
// Required for sql.
// MySQL auth (see private template)
auth: private.my_remote_machine.mysql,
// Optional.
// Ignore trigger in dump file
skipTriggers: true,
// Optional.
// List of table name to ignore in dump file
// Note that every table name must have database name as prefix
ignore: [
'shop.users',
'shop.timesheet',
],
// Optional.
// Use this if you need sudo privileges to read remote file (see private template)
sudo: private.my_remote_machine.sudo,
// Required.
// When scheduled backup, based on crontab string
cron: '*/3 * * * *',
// Optional.
// Backup retention limit in days
// If it is omitted is illimited
retentionDays: 90
},
// File backup example
// Copy specified file from remote host
file_example: {
// Required.
// SSH auth (see private template)
host: private.my_remote_machine.ssh,
// Required.
// Backup type
type: 'file',
// Required for file.
// Path to file on remote host to backup
path: '/var/log/apache2/access.log',
// Optional.
// Use this if you need sudo privileges to read remote file (see private template)
sudo: private.my_remote_machine.sudo,
// Required.
// When scheduled backup, based on crontab string
cron: '*/3 * * * *',
// Optional.
// Backup retention limit in days
// If it is omitted is illimited
retentionDays: 90
},
// Exec backup example
// Run specified command on remote host and backup output
exec_example: {
// Required.
// SSH auth (see private template)
host: private.my_remote_machine.ssh,
// Required.
// Backup type
type: 'exec',
// Required for exec.
// Command to run on remote host
command: 'tail /var/log/apache2/error.log',
// Optional.
// Use this if you need sudo privileges to run command on remote host (see private template)
sudo: private.my_remote_machine.sudo,
// Required.
// When scheduled backup, based on crontab string
cron: '40 * * * *',
// Optional.
// Backup retention limit in days
// If it is omitted is illimited
retentionDays: 90
}
}
};