File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,12 @@ GHE_DATA_DIR="data"
13
13
# after successful backups. This option should be tuned based on the frequency
14
14
# of scheduled backup runs. If backups are scheduled hourly, snapshots will be
15
15
# 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 ...
17
17
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
19
22
20
23
# The hostname of the GitHub appliance to restore. If you've set up a separate
21
24
# GitHub appliance to act as a standby for recovery, specify its IP or hostname
Original file line number Diff line number Diff line change @@ -284,13 +284,17 @@ if [ "$GHE_BACKUP_FSCK" = "yes" ]; then
284
284
fi
285
285
286
286
# 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.
289
289
if [ -z " $failures " ]; then
290
290
rm " incomplete"
291
291
292
292
rm -f " ../current"
293
293
ln -s " $GHE_SNAPSHOT_TIMESTAMP " " ../current"
294
+
295
+ if [[ $GHE_PRUNING_SCHEDULED != " yes" ]]; then
296
+ ghe-prune-snapshots
297
+ fi
294
298
fi
295
299
296
300
END_TIME=$( date +%s)
You can’t perform that action at this time.
0 commit comments