@@ -4,20 +4,23 @@ GitHub Enterprise Backup Utilities
4
4
This repository includes backup and recovery utilities for [ GitHub Enterprise] [ 1 ] .
5
5
6
6
- ** [ Features] ( #features ) **
7
- - ** [ Getting started] ( #getting-started ) **
8
7
- ** [ Requirements] ( #requirements ) **
9
- - ** [ Backup host and storage requirements] ( #backup-host-and-storage-requirements ) **
10
- - ** [ GitHub Enterprise version requirements] ( #github-enterprise-version-requirements ) **
11
- - ** [ Example usage] ( #example-usage ) **
12
- - ** [ Scheduling] ( #scheduling ) **
8
+ - ** [ Backup host] ( #backup-host ) **
9
+ - ** [ Storage] ( #storage ) **
10
+ - ** [ GitHub Enterprise version] ( #github-enterprise-version ) **
11
+ - ** [ Getting started] ( #getting-started ) **
12
+ - ** [ Using the backup and restore commands] ( #using-the-backup-and-restore-commands ) **
13
+ - ** [ Scheduling backups] ( #scheduling-backups ) **
13
14
- ** [ Backup snapshot file structure] ( #backup-snapshot-file-structure ) **
14
15
- ** [ Support] ( #support ) **
15
16
16
17
### Features
17
18
18
- The backup utilities are based on the backup and restore capabilities built
19
- in to GitHub Enterprise but implement a number of advanced features for
20
- backup hosts:
19
+ The backup utilities implement a number of advanced capabilities for backup
20
+ hosts, built on top of the backup and restore features already included in
21
+ GitHub Enterprise.
22
+
23
+ These advanced features include:
21
24
22
25
- Complete GitHub Enterprise backup and recovery system via two simple utilities:<br >
23
26
` ghe-backup ` and ` ghe-restore ` .
@@ -34,12 +37,38 @@ backup hosts:
34
37
- Runs under most Linux/Unix environments.
35
38
- MIT licensed, open source software maintained by GitHub, Inc.
36
39
37
- ### Getting started
40
+ ### Requirements
38
41
39
42
The backup utilities should be run on a host dedicated to long-term permanent
40
43
storage and must have network connectivity with the GitHub Enterprise appliance.
41
- See the section below on * Backup host and storage requirements* for more
42
- information.
44
+
45
+ ##### Backup host
46
+
47
+ Backup host software requirements are modest: Linux or other modern Unix
48
+ operating system with [ rsync] [ 4 ] v2.6.4 or newer.
49
+
50
+ The backup host must be able to establish network connections outbound to the
51
+ GitHub appliance over SSH (port 22).
52
+
53
+ ##### Storage
54
+
55
+ Storage requirements vary based on current Git repository disk usage and growth
56
+ patterns of the GitHub appliance. We recommend allocating at least 5x the amount
57
+ of storage allocated to the primary GitHub appliance for historical snapshots
58
+ and growth over time.
59
+
60
+ ##### GitHub Enterprise version
61
+
62
+ For online and incremental backup support, the GitHub Enterprise instance must
63
+ be running version 11.10.341 or above.
64
+
65
+ Earlier versions are supported by the
66
+ backup utilities, but online and incremental backups are not supported. We
67
+ strongly recommend upgrading to the latest release if you're running a version
68
+ prior to 11.10.341. Visit https://enterprise.github.com to [ download the most
69
+ recent GitHub Enterprise version] [ 5 ] .
70
+
71
+ ### Getting started
43
72
44
73
1 . [ Download the latest release] [ release ] and extract:
45
74
@@ -63,40 +92,18 @@ information.
63
92
64
93
5 . Run ` bin/ghe-backup ` to perform an initial full backup.
65
94
66
- Subsequent invocations of the ` ghe-backup ` command will create incremental
67
- snapshots of repository data along with full snapshots of all other pertinent
68
- data stores. Snapshots may be restored to the same or separate GitHub appliance
69
- via the ` ghe-restore ` command. See the * Example usage* section below for more
70
- detailed information.
71
-
72
95
[ release ] : https://github.com/github/backup-utils/releases/download/v0.9.0/github-backup-utils-v0.9.0.tar.gz
73
96
74
- ### Requirements
97
+ ### Using the backup and restore commands
75
98
76
- ##### Backup host and storage requirements
99
+ After the initial backup, use the following commands:
77
100
78
- Backup host software requirements are modest: Linux or other modern Unix
79
- operating system with [ rsync] [ 4 ] v2.6.4 or newer.
80
-
81
- The backup host must be able to establish network connections outbound to the
82
- GitHub appliance over SSH (port 22).
83
-
84
- Storage requirements vary based on current Git repository disk usage and growth
85
- patterns of the GitHub appliance. Allocating at least 5x the amount of storage
86
- allocated to the primary GitHub appliance for historical snapshots and growth
87
- over time is recommended.
88
-
89
- ##### GitHub Enterprise version requirements
90
-
91
- For online and incremental backup support, the GitHub Enterprise instance must
92
- be running version 11.10.341 or above. Earlier versions are supported by the
93
- backup utilities but online and incremental backups are not supported. We
94
- strongly recommend upgrading to the latest release if you're running a version
95
- prior to 11.10.341. Visit https://enterprise.github.com to [ download the most
96
- recent GitHub Enterprise version] [ 5 ] .
97
-
98
- ### Example usage
101
+ - The ` ghe-backup ` command creates incremental snapshots of repository data,
102
+ along with full snapshots of all other pertinent data stores.
103
+ - The ` ghe-restore ` command restores snapshots to the same or separate GitHub
104
+ appliance.
99
105
106
+ ##### Example backup and restore usage
100
107
101
108
The following assumes that ` GHE_HOSTNAME ` is set to "github.example.com" in
102
109
` backup.config ` .
@@ -137,24 +144,33 @@ The `ghe-backup` and `ghe-restore` commands also have a verbose output mode
137
144
(` -v ` ) that lists files as they're being transferred. It's often useful to
138
145
enable when output is logged to a file.
139
146
140
- ### Scheduling
147
+ ### Scheduling backups
141
148
142
149
Regular backups should be scheduled using ` cron(8) ` or similar command
143
- scheduling service on the backup host.
150
+ scheduling service on the backup host. The backup frequency will dictate the
151
+ worst case recovery point objective (RPO) in your backup plan. We recommend the
152
+ following:
144
153
145
- We recommend a backup frequency of hourly for GitHub Enterprise versions
146
- 11.10.341 or greater, and daily for versions prior to 11.10.341. The more
147
- frequent schedule is possible on newer versions because of the improved online
148
- and incremental backup support.
154
+ - ** Hourly backups** for GitHub Enterprise versions 11.10.341 or greater (due to
155
+ improved online and incremental backup support)
156
+ - ** Daily backups** for versions prior to 11.10.341.
149
157
150
- The backup frequency will dictate the worst case recovery point objective (RPO)
151
- in your backup plan.
158
+ Note: the time required to do full offline backups of large datasets under
159
+ GitHub Enterprise versions prior to 11.10.341 may prohibit the use of daily
160
+ backups. We strongly recommend upgrading to 11.10.341 or greater in that case.
161
+
162
+ ##### Example scheduling usage
152
163
153
164
The following examples assume the backup utilities are installed under
154
165
` /opt/backup-utils ` . The crontab entry should be made under the same user that
155
166
manual backup/recovery commands will be issued under and must have write access
156
167
to the configured ` GHE_DATA_DIR ` directory.
157
168
169
+ Note that the ` GHE_NUM_SNAPSHOTS ` option in ` backup.config ` should be tuned
170
+ based on the frequency of backups. The ten most recent snapshots are retained by
171
+ default. The number should be adjusted based on backup frequency and available
172
+ storage.
173
+
158
174
To schedule hourly backup snapshots with verbose informational output written to
159
175
a log file and errors generating an email:
160
176
@@ -168,17 +184,15 @@ To schedule nightly backup snapshots instead, use:
168
184
169
185
0 0 * * * /opt/backup-utils/bin/ghe-backup -v 1>>/opt/backup-utils/backup.log
170
186
171
- Note that the ` GHE_NUM_SNAPSHOTS ` option in ` backup.config ` should be tuned
172
- based on the frequency of backups. The ten most recent snapshots are retained by
173
- default. The number should be adjusted based on backup frequency and available
174
- storage.
175
-
176
187
### Backup snapshot file structure
177
188
178
189
Backup snapshots are stored in rotating increment directories named after the
179
190
date and time the snapshot was taken. Each snapshot directory contains a full
180
- backup snapshot of all relevant data stores. The following example shows a
181
- snapshot file hierarchy for hourly
191
+ backup snapshot of all relevant data stores.
192
+
193
+ The following example shows a snapshot file hierarchy for hourly frequency.
194
+ There are five snapshot directories, with the ` current ` symlink pointing to the
195
+ most recent successful snapshot:
182
196
183
197
./data
184
198
|- 20140724T010000
@@ -195,9 +209,6 @@ snapshot file hierarchy for hourly
195
209
|- repositories/
196
210
|- current -> 20140727T010000
197
211
198
- In the example above, five snapshot directories exist with the most recent
199
- successful snapshot being pointed to by the ` current ` symlink.
200
-
201
212
Note: the ` GHE_DATA_DIR ` variable set in ` backup.config ` can be used to change
202
213
the disk location where snapshots are written.
203
214
0 commit comments