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
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
# Always allow restoring to unconfigured appliances.
12
+
# Additional checks are required if the instance is configured.
13
+
if is_instance_configured;then
14
+
15
+
if internal_database_snapshot_to_external_database;then
16
+
17
+
# Restoring settings in this scenario would change BYODB state, which is not supported via backup-utils.
18
+
if$RESTORE_SETTINGS;then
19
+
echo"Restoring the settings of a snapshot from an appliance using the bundled MySQL service to an appliance using an externally-managed MySQL service is not supported."
20
+
echo"Please reconfigure the appliance first, then run ghe-restore again."
21
+
exit 1
22
+
fi
23
+
24
+
# Restoring interal DB snapshot to BYODB appliance without passing in --skip-mysql is not supported.
25
+
if!$SKIP_MYSQL;then
26
+
echo"Restoring a snapshot from an appliance using the bundled MySQL service to an appliance using an externally-managed MySQL service is not supported."
27
+
echo"Please migrate the MySQL data beforehand, then run ghe-restore again, passing in the --skip-mysql flag."
28
+
exit 1
29
+
fi
30
+
fi
31
+
32
+
if external_database_snapshot_to_internal_database;then
33
+
34
+
# Restoring settings in this scenario would change BYODB state, which is not supported via backup-utils.
35
+
if$RESTORE_SETTINGS;then
36
+
echo"Restoring the settings of a snapshot from an appliance using an externally-managed MySQL service to an appliance using the bundled MySQL service is not supported."
37
+
echo"Please reconfigure the appliance first, then run ghe-restore again."
38
+
exit 1
39
+
fi
40
+
41
+
# Restoring BYODB snapshot to internal DB appliance without passing in --skip-mysql is not supported.
42
+
if!$SKIP_MYSQL;then
43
+
echo"Restoring a snapshot from an appliance using an externally-managed MySQL service to an appliance using the bundled MySQL service is not supported."
44
+
echo"Please migrate the MySQL data beforehand, then run ghe-restore again, passing in the --skip-mysql flag."
0 commit comments