File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -90,3 +90,6 @@ GHE_NUM_SNAPSHOTS=10
90
90
# When running an external mysql database, run this script to trigger a MySQL restore
91
91
# rather than attempting to backup via backup-utils directly.
92
92
#EXTERNAL_DATABASE_RESTORE_SCRIPT="/bin/false"
93
+
94
+ # If set to 'yes', Pages data will be included in backup and restore. Defaults to 'yes'
95
+ #GHE_BACKUP_PAGES=no
Original file line number Diff line number Diff line change @@ -231,9 +231,14 @@ commands+=("
231
231
echo \" Backing up Git repositories ...\"
232
232
ghe-backup-repositories || printf %s \" repositories \" >> \" $failures_file \" " )
233
233
234
- commands+=("
235
- echo \" Backing up GitHub Pages artifacts ...\"
236
- ghe-backup-pages || printf %s \" pages \" >> \" $failures_file \" " )
234
+ # Pages backups are skipped only if GHE_BACKUP_PAGES is explicitly set to 'no' to guarantee backward compatibility.
235
+ # If a customer upgrades backup-utils but keeps the config file from a previous version, Pages backups still work as expected.
236
+
237
+ if [ " $GHE_BACKUP_PAGES " != " no" ]; then
238
+ commands+=("
239
+ echo \" Backing up GitHub Pages artifacts ...\"
240
+ ghe-backup-pages || printf %s \" pages \" >> \" $failures_file \" " )
241
+ fi
237
242
238
243
commands+=("
239
244
echo \" Backing up storage data ...\"
Original file line number Diff line number Diff line change @@ -447,9 +447,11 @@ commands+=("
447
447
echo \" Restoring Gists ...\"
448
448
ghe-restore-repositories-gist \" $GHE_HOSTNAME \" " )
449
449
450
- commands+=("
451
- echo \" Restoring GitHub Pages artifacts ...\"
452
- ghe-restore-pages \" $GHE_HOSTNAME \" 1>&3" )
450
+ if [ " $GHE_BACKUP_PAGES " != " no" ]; then
451
+ commands+=("
452
+ echo \" Restoring GitHub Pages artifacts ...\"
453
+ ghe-restore-pages \" $GHE_HOSTNAME \" 1>&3" )
454
+ fi
453
455
454
456
commands+=("
455
457
echo \" Restoring SSH authorized keys ...\"
You can’t perform that action at this time.
0 commit comments