File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -95,3 +95,6 @@ GHE_NUM_SNAPSHOTS=10
95
95
# When running an external mysql database, run this script to trigger a MySQL restore
96
96
# rather than attempting to backup via backup-utils directly.
97
97
#EXTERNAL_DATABASE_RESTORE_SCRIPT="/bin/false"
98
+
99
+ # If set to 'yes', Pages data will be included in backup and restore. Defaults to 'yes'
100
+ #GHE_BACKUP_PAGES=no
Original file line number Diff line number Diff line change @@ -238,10 +238,15 @@ commands+=("
238
238
echo \" $cmd_title \"
239
239
ghe-backup-repositories || printf %s \" repositories \" >> \" $failures_file \" " )
240
240
241
- cmd_title=$( log_info " Backing up GitHub Pages artifacts ..." )
242
- commands+=("
243
- echo \" $cmd_title \"
244
- ghe-backup-pages || printf %s \" pages \" >> \" $failures_file \" " )
241
+ # Pages backups are skipped only if GHE_BACKUP_PAGES is explicitly set to 'no' to guarantee backward compatibility.
242
+ # If a customer upgrades backup-utils but keeps the config file from a previous version, Pages backups still work as expected.
243
+
244
+ if [ " $GHE_BACKUP_PAGES " != " no" ]; then
245
+ cmd_title=$( log_info " Backing up GitHub Pages artifacts ..." )
246
+ commands+=("
247
+ echo \" $cmd_title \"
248
+ ghe-backup-pages || printf %s \" pages \" >> \" $failures_file \" " )
249
+ fi
245
250
246
251
cmd_title=$( log_info " Backing up storage data ..." )
247
252
commands+=("
Original file line number Diff line number Diff line change @@ -459,10 +459,12 @@ commands+=("
459
459
echo \" $cmd_title \"
460
460
ghe-restore-repositories-gist \" $GHE_HOSTNAME \" " )
461
461
462
- cmd_title=$( log_info " Restoring Pages ..." )
463
- commands+=("
464
- echo \" $cmd_title \"
465
- ghe-restore-pages \" $GHE_HOSTNAME \" 1>&3" )
462
+ if [ " $GHE_BACKUP_PAGES " != " no" ]; then
463
+ cmd_title=$( log_info " Restoring Pages ..." )
464
+ commands+=("
465
+ echo \" $cmd_title \"
466
+ ghe-restore-pages \" $GHE_HOSTNAME \" 1>&3" )
467
+ fi
466
468
467
469
cmd_title=$( log_info " Restoring SSH authorized keys ..." )
468
470
commands+=("
You can’t perform that action at this time.
0 commit comments