backup-utils icon indicating copy to clipboard operation
backup-utils copied to clipboard

-c flag not respected

Open nikhil1290 opened this issue 3 years ago • 3 comments

backup-utils 3.3 is restoring the settings even if the -c is not passed.

nikhil1290 avatar Dec 09 '21 14:12 nikhil1290

@nikhil1290 🙇‍♂️ Appreciate if you can please provide specific details:

  • version of backup-utils used.
  • version of GHES Instance data restored to.
  • list of configurations which got over-written.

Validated in-house on a GHES 3.3.1 instance with latest backup-utils 3.3.1 - the restore worked as expected:

  • without -c option, settings were not overwritten.
  • with -c option, settings got overwritten.

Note: Manually modified and saved some settings on Management console to monitor after the backup was done. https://<ghes-fqdn>:8443/setup/settings

 % bin/ghe-restore bonsohi-1641505136.ghe-test.ninja
Checking for leaked keys in the backup snapshot that is being restored ...
* No leaked keys found
Connect bonsohi-1641505136.ghe-test.ninja:122 OK (v3.3.1)

WARNING: All data on GitHub Enterprise appliance bonsohi-1641505136.ghe-test.ninja (v3.3.1)
         will be overwritten with data from snapshot 20220118T223646.

Please verify that this is the correct restore host before continuing.
Type 'yes' to continue: yes

Start time: 1642575868
Starting restore of bonsohi-1641505136.ghe-test.ninja:122 with backup-utils v3.3.1 from snapshot 20220118T223646
Stopping cron and github-timerd ...
Restoring UUID ...
Restoring MySQL database from binary backup snapshot on an appliance configured for binary backups ...
Restoring Redis database ...
Restoring Git repositories ...
Restoring Gists ...
Restoring GitHub Pages artifacts ...
Restoring SSH authorized keys ...
Restoring storage data ...
Restoring custom Git hooks ...
Restoring Elasticsearch indices ...
Restoring Audit logs ...
Configuring appliance ...
Starting cron ...
Restoring SSH host keys ...
End time: 1642576725
Runtime: 857 seconds
Restore of bonsohi-1641505136.ghe-test.ninja:122 from snapshot 20220118T223646 finished.

 % bin/ghe-restore -c bonsohi-1641505136.ghe-test.ninja
Checking for leaked keys in the backup snapshot that is being restored ...
* No leaked keys found
Connect bonsohi-1641505136.ghe-test.ninja:122 OK (v3.3.1)

WARNING: All data on GitHub Enterprise appliance bonsohi-1641505136.ghe-test.ninja (v3.3.1)
         will be overwritten with data from snapshot 20220118T223646.

Please verify that this is the correct restore host before continuing.
Type 'yes' to continue: yes

Start time: 1642577236
Starting restore of bonsohi-1641505136.ghe-test.ninja:122 with backup-utils v3.3.1 from snapshot 20220118T223646
Stopping cron and github-timerd ...
Restoring license ...
Restoring settings and applying configuration ...
Restoring management console password ...
Restoring CA certificates ...
 --> Importing custom CA certificates...
 --> Updating CA certificates...
 --> Done.
Restoring UUID ...
Restoring MySQL database from binary backup snapshot on an appliance configured for binary backups ...
Restoring Redis database ...
Restoring Git repositories ...
Restoring Gists ...
Restoring GitHub Pages artifacts ...
Restoring SSH authorized keys ...
Restoring storage data ...
Restoring custom Git hooks ...
Restoring Elasticsearch indices ...
Restoring Audit logs ...
Configuring appliance ...
Starting cron ...
Restoring SSH host keys ...
End time: 1642578294
Runtime: 1058 seconds
Restore of bonsohi-1641505136.ghe-test.ninja:122 from snapshot 20220118T223646 finished.

The data was backed up from the same instance to start with.

 % bin/ghe-backup 
Starting backup of bonsohi-1641505136.ghe-test.ninja with backup-utils v3.3.1 in snapshot 20220118T223646
Connect bonsohi-1641505136.ghe-test.ninja:122 OK (v3.3.1)
Backing up GitHub settings ...
Backing up SSH authorized keys ...
Backing up SSH host keys ...
Backing up MySQL database using binary backup strategy ...
Backing up Redis database ...
Backing up audit log ...
Backing up Git repositories ...
Backing up GitHub Pages artifacts ...
Backing up storage data ...
Backing up custom Git hooks ...
Backing up Elasticsearch indices ...
Completed backup of bonsohi-1641505136.ghe-test.ninja:122 in snapshot 20220118T223646 at 22:38:13
Checking for leaked ssh keys ...
* No leaked keys found

bonsohi avatar Jan 19 '22 08:01 bonsohi

Best to close this as the validation in-house demonstrated no issues. 👍

bonsohi avatar Jan 21 '22 02:01 bonsohi

This seems only to reproduce when the User/license sync setting is enabled across the GitHub::Connect link.

gm3dmo avatar Jan 26 '22 08:01 gm3dmo