Commit 6f24de5
authored
Merge upstream (#84)
* Skip hookshot es backup on pre 2.0
* Only restore hookshot es backup to cluster
* Correct minor spelling error
* Backup and restore ca certificates
* Don't suppress output
* Check if command exists so to expose errors
* Backup not restore
* Use which instead of type to verify existence
* Silence test output
* Run bm_file_path first
* Revert removal of bm_file_path from bm_start
In case bm.sh is used outside or independently of ghe-backup or
ghe-restore, such as when testing backup utilities individual
components.
* Rename bm_file_path to bm_init
Should make the intention a bit more clear.
* Add --version flag to all commands
* Check for missing GHE_DATA_DIR variable in config
```
$ ./bin/ghe-backup
./bin/../share/github-backup-utils/ghe-backup-config: line 82: [: !=: unary operator expected
mkdir: : No such file or directory
```
These errors occur because `GHE_DATA_DIR` is not defined before running`ghe-backup-config`, causing it to throw errors.
```
$ ./share/github-backup-utils/ghe-backup-config
./share/github-backup-utils/ghe-backup-config: line 82: [: !=: unary operator expected
mkdir: : No such file or directory
Error: GHE_DATA_DIR does not exist.
```
This change adds a test to ensure `GHE_DATA_DIR` is defined, else return an appropriate error.
```
$ ./bin/ghe-backup
Error: GHE_DATA_DIR not set in config file.
$ ./share/github-backup-utils/ghe-backup-config
Error: GHE_DATA_DIR not set in config file.
```
* Check backup-utils are not being run on GitHub Enterprise host
Customers occasionally configure backup-utils to run on the GitHub Enterprise
host or HA replica. Apart from losing their backup if the appliance is lost,
it leads to running out of disk space issues.
This PR adds a check for this case and returns an informative error to guide the user.1 parent 908a38c commit 6f24de5
5 files changed
+17
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
| |||
159 | 162 | | |
160 | 163 | | |
161 | 164 | | |
162 | | - | |
163 | 165 | | |
164 | | - | |
165 | | - | |
166 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
167 | 170 | | |
168 | 171 | | |
169 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
| |||
328 | 331 | | |
329 | 332 | | |
330 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
331 | 337 | | |
332 | 338 | | |
333 | 339 | | |
334 | 340 | | |
335 | 341 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | 342 | | |
340 | 343 | | |
341 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
0 commit comments