Skip to content

Commit e43df4a

Browse files
release-controller[bot]release-controller[bot]
authored andcommitted
3.16.4 release
1 parent 7d9d2bc commit e43df4a

File tree

4 files changed

+48
-2
lines changed

4 files changed

+48
-2
lines changed

docs/backup.config-example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ GHE_NUM_SNAPSHOTS=10
2121
# Instead, ghe-prune-snapshots will need to be invoked separately via cron
2222
#GHE_PRUNING_SCHEDULED=yes
2323

24+
# If --incremental is used to generate incremental MySQL backups with ghe-backup,
25+
# then you need to specify how many cycles of full and incremental backups will be
26+
# performed before the next full backup is created.
27+
# For example, if `GHE_INCREMENTAL_BACKUP_MAX` is set to 14, backup-utils will
28+
# run 1 full backup and then 13 incremental backups before performing another full backup on the next cycle.
29+
#GHE_INCREMENTAL_MAX_BACKUPS=14
30+
2431
# If GHE_ROUTE_VERIFICATION is set to true then ghe-repository-backup and
2532
# ghe-storage-backup will issue a warning if the repositories and objects in
2633
# the backup do not match the pre-backup inventory of routes.

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@
3737
3838
[1]: https://github.com/github/backup-utils/releases
3939
[2]: https://github.com/github/backup-utils/releases/tag/v2.11.4
40-
[3]: https://github.com/github/backup-utils/blob/master/docs/backup.config-example
40+
[3]: https://github.com/github/enterprise-backup-site/blob/master/docs/backup.config-example
4141
[4]: https://docs.github.com/enterprise-server/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Incremental MySQL Backups and Restores
2+
3+
Customers who have large MySQL databases who wish to save storage space can use the `--incremental` flag with `ghe-backup` and `ghe-restore`.
4+
Using this flag performs backups for other parts of GHES as normal, but only performs a MySQL backup of the changes to the database from the previous snapshot.
5+
For larger databases this can conserve a lot of storage space for backups.
6+
7+
## Configuring number of backups
8+
9+
In your backup.config file you will need to set the variable `GHE_INCREMENTAL_MAX_BACKUPS`.
10+
This variable determines how many cycles of full and incremental backups will be performed before the next full backup is created.
11+
For example, if `GHE_INCREMENTAL_MAX_BACKUPS` is set to 14, backup-utils will run 1 full backup and then 13 incremental backups before performing another full backup on the next cycle.
12+
13+
Incremental backups require the previous snapshot backups before them to work.
14+
This means they do not follow the pruning strategy based on `GHE_NUM_SNAPSHOTS`.
15+
16+
## Performing incremental backups
17+
18+
To perform incremental backups:
19+
20+
`bin/ghe-backup --incremental`
21+
22+
the program will detect whether it needs to performa full or incremental snapshot based on what is currently in `GHE_DATA_DIR`.
23+
24+
To see what snapshots are part of your full and incremental backups, you can reference `GHE_DATA_DIR/inc_full_backup` and `GHE_DATA_DIR/inc_snapshot_data`, respectively.
25+
26+
## Performing incremental restores
27+
28+
To perform incremental restores:
29+
30+
`bin/ghe-restore --incremental -s <snapshot-id>`
31+
32+
The program will use the MySQL folders from each previous incremental backup and the full backup to restore the database.
33+
34+
:warning: Incremental restores require the other snapshots in the cycle to complete a restore. Erasing snapshot directories that are part of a cycle corrupts the restore and makes it impossible to restore for the MySQL database.
35+
36+
### Previous cycles
37+
38+
To ensure there is a rolling window of mySQL backups, incremental MySQL backups from the cycle before the current one are kept. Those snapshots are pre-pended with `inc_previous`. To perform a restore from there, just use the full directory name for the snapshot ID.

docs/usage.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ Please refer to [GHES Documentation](https://docs.github.com/en/enterprise-serve
112112

113113
## Incremental MySQL Backups and Restores
114114

115-
Incremental MySQL backup has been deprecated since 3.17 due to data integrity concerns. Restoring backups created with incremental backups remains supported for compatibility reasons.
115+
If you are interested in performing incremental backups of the MySQL data in your GitHub Enterprise Server instance, see [Incremental MySQL Backups and Restores](incremental-mysql-backups-and-restores.md) for details.
116+
116117
## Rsync compression
117118

118119
From backup-utils v3.11.0 onwards, we have disabled rsync compression by default to improve transfer speed and reduce CPU usage during the transfer process.

0 commit comments

Comments
 (0)