Skip to content

Commit 20ed862

Browse files
authored
Merge pull request #205 from github/dhadka/mssql-default-cadence
Set default backup cadence for MSSQL
2 parents 80f845f + 031d37e commit 20ed862

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

backup.config-example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ GHE_NUM_SNAPSHOTS=10
6060
# - Differential backup every day (1440 minutes)
6161
# - Transactionlog backup every 15 minutes
6262
#
63-
GHE_MSSQL_BACKUP_CADENCE=10080,1440,15
63+
#GHE_MSSQL_BACKUP_CADENCE=10080,1440,15
6464

6565
# If set to 'yes', ghe-backup jobs will run in parallel. Defaults to 'no'.
6666
#

share/github-backup-utils/ghe-backup-config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,12 @@ export GHE_SNAPSHOT_DIR
243243
# Base path for temporary directories and files.
244244
: ${TMPDIR:="/tmp"}
245245

246+
# Backup cadence for MS SQL. Determines the kind of backup taken, either full, differential,
247+
# or transaction log, based on when the last backup of that kind was taken. This defaults to
248+
# taking a full backup once a week, a differential backup once a day, and transaction logs every
249+
# 15 minutes.
250+
: ${GHE_MSSQL_BACKUP_CADENCE:=10080,1440,15}
251+
246252
###############################################################################
247253
### Dynamic remote version config
248254

test/test-ghe-backup.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,16 @@ begin_test "ghe-backup missing directories or files on source appliance"
341341
)
342342
end_test
343343

344+
begin_test "ghe-backup has default cadence configured"
345+
(
346+
set -e
347+
enable_actions
348+
349+
[ -n "$GHE_MSSQL_BACKUP_CADENCE" ]
350+
)
351+
end_test
352+
353+
# Override backup cadence for testing purposes
344354
GHE_MSSQL_BACKUP_CADENCE=10,5,1
345355
export GHE_MSSQL_BACKUP_CADENCE
346356
setup_actions_test_data $GHE_REMOTE_DATA_USER_DIR

0 commit comments

Comments
 (0)