Skip to content

Commit fbfb368

Browse files
committed
update review comments
1 parent 95daff2 commit fbfb368

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

backup.config-example

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ GHE_DATA_DIR="data"
1313
# after successful backups. This option should be tuned based on the frequency
1414
# of scheduled backup runs. If backups are scheduled hourly, snapshots will be
1515
# available for the past N hours; if backups are scheduled daily, snapshots will
16-
# be available for the past N days. Pruning enablement defaults to 'yes'
16+
# be available for the past N days ...
1717
GHE_NUM_SNAPSHOTS=10
18-
#GHE_PRUNING_ENABLED=no
18+
19+
# Pruning snapshots can be scheduled outside of the backup process. If set to 'yes'
20+
# ghe-pruning-snapshots will need to be invoked separately via cron
21+
#GHE_PRUNING_SCHEDULED=yes
1922

2023
# The hostname of the GitHub appliance to restore. If you've set up a separate
2124
# GitHub appliance to act as a standby for recovery, specify its IP or hostname

bin/ghe-backup

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,17 @@ if [ "$GHE_BACKUP_FSCK" = "yes" ]; then
284284
fi
285285

286286
# If everything was successful, mark the snapshot as complete, update the
287-
# current symlink to point to the new snapshot
288-
# Expired and failed snapshots to be pruned separately
287+
# current symlink to point to the new snapshot and prune expired and failed
288+
# snapshots.
289289
if [ -z "$failures" ]; then
290290
rm "incomplete"
291291

292292
rm -f "../current"
293293
ln -s "$GHE_SNAPSHOT_TIMESTAMP" "../current"
294+
295+
if [[ $GHE_PRUNING_SCHEDULED != "yes" ]]; then
296+
ghe-prune-snapshots
297+
fi
294298
fi
295299

296300
END_TIME=$(date +%s)

0 commit comments

Comments
 (0)