You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo"Restoring MySQL database from ${backup_snapshot_strategy} backup snapshot on an appliance configured for ${appliance_strategy} backups ..."
310
+
ghe-restore-mysql "$GHE_HOSTNAME"1>&3
270
311
fi
271
312
272
-
echo"Restoring MySQL database from ${backup_snapshot_strategy} backup snapshot on an appliance configured for ${appliance_strategy} backups ..."
273
-
ghe-restore-mysql "$GHE_HOSTNAME"1>&3
313
+
if ghe-ssh "$GHE_HOSTNAME" -- 'ghe-config --true app.actions.enabled';then
314
+
echo"Restoring MSSQL databases ..."
315
+
ghe-restore-mssql "$GHE_HOSTNAME"1>&3
316
+
317
+
echo"Restoring Actions data ..."
318
+
ghe-restore-actions "$GHE_HOSTNAME"1>&3
319
+
echo"* WARNING: Every self-hosted Actions runner that communicates with the restored GHES server must be restarted or reconfigured in order to continue functioning."
320
+
echo" See https://docs.github.com/en/actions/hosting-your-own-runners/adding-self-hosted-runners for more details on how to reconfigure self-hosted Actions runners."
Copy file name to clipboardExpand all lines: docs/backup-snapshot-file-structure.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,7 @@ most recent successful snapshot:
32
32
|- enterprise.ghl
33
33
|- es-scan-complete
34
34
|- manage-password
35
+
|- mssql
35
36
|- mysql.sql.gz
36
37
|- redis.rdb
37
38
|- settings.json
@@ -44,3 +45,20 @@ most recent successful snapshot:
44
45
45
46
Note: the `GHE_DATA_DIR` variable set in `backup.config` can be used to change
46
47
the disk location where snapshots are written.
48
+
49
+
## MS SQL Server backup structure
50
+
Actions service uses MS SQL Server as backend data store. Each snapshot includes a suite of backup files for MS SQL Server database(s).
51
+
52
+
To save time in backup, a three-level backup strategy is implemented. Based on the `GHE_MSSQL_BACKUP_CADENCE` setting, at each snapshot, either a (**F**)ull backup, a (**D**)ifferential or a (**T**)ransaction log backup is taken.
53
+
54
+
As a result, a suite always contains following for each database: a full backup, possibly a differential backup and at least one transaction log backup. Their relationship with timeline is demonstrated below:
To save disk space, at each snapshot, hard links are created to point to previous backup files. Only newly-created backup files are transferred from appliance to backup host. When a new full/differential backup is created, they become the new source for hard links and new base line for transaction log backups, for subsequent snapshots.
63
+
64
+
During restore, a suite of backup files are restored in the sequence of full -> differential -> chronological transaction log.
Copy file name to clipboardExpand all lines: docs/usage.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,8 @@ You can supply your own configuration file or use the example configuration file
16
16
17
17
An example configuration file with documentation on possible settings can found in [backup.config-example](../backup.config-example).
18
18
19
+
There are a number of command line options that can also be passed to the `ghe-restore` command. Of particular note, if you use an external MySQL service but are restoring from a snapshot prior to enabling this, or vice versa, you must migrate the MySQL data outside of the context of backup-utils first, then pass the `--skip-mysql` flag to `ghe-restore`.
20
+
19
21
## Example backup and restore usage
20
22
21
23
The following assumes that `GHE_HOSTNAME` is set to "github.example.com" in
0 commit comments