Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output MySQL backup strategy for clarity during backup and restore #610

Merged
merged 7 commits into from May 14, 2020

Conversation

cainejette
Copy link
Contributor

@cainejette cainejette commented May 14, 2020

Adds some verbosity around logical vs binary backups as configured on the appliance, as well as if the snapshot itself in the restore process is binary vs logical

Backup output with binary backups not set:

$ ./backup-utils/bin/ghe-backup 
Starting backup of 10.0.1.171 with backup-utils v2.21 in snapshot 20200514T035830
Connect 10.0.1.171:122 OK (v2.21.0)
Backing up GitHub settings ...
Backing up SSH authorized keys ...
Backing up SSH host keys ...
Backing up MySQL database using logical backup strategy ...

Backup output with binary backups set:

$ ./backup-utils/bin/ghe-backup 
Starting backup of 10.0.1.171 with backup-utils v2.21 in snapshot 20200514T035902
Connect 10.0.1.171:122 OK (v2.21.0)
Backing up GitHub settings ...
Backing up SSH authorized keys ...
Backing up SSH host keys ...
Backing up MySQL database using binary backup strategy ...

Restore output against logical appliance with logical backup:

$ ./bin/ghe-restore -s 20200514T045636 10.0.1.171
Checking for leaked keys in the backup snapshot that is being restored ...
* No leaked keys found
Connect 10.0.1.171:122 OK (v2.21.0)

WARNING: All data on GitHub Enterprise appliance 10.0.1.171 (v2.21.0)
         will be overwritten with data from snapshot 20200514T045636.
Please verify that this is the correct restore host before continuing.
Type 'yes' to continue: yes

Starting restore of 10.0.1.171:122 with backup-utils v2.21 from snapshot 20200514T045636
Stopping cron and github-timerd ...
Restoring UUID ...
Restoring MySQL database from logical backup snapshot on an appliance configured for logical backups ...

Restore output against binary appliance with logical backup:

$ ./bin/ghe-restore -s 20200514T045636 10.0.1.171
Checking for leaked keys in the backup snapshot that is being restored ...
* No leaked keys found
Connect 10.0.1.171:122 OK (v2.21.0)

WARNING: All data on GitHub Enterprise appliance 10.0.1.171 (v2.21.0)
         will be overwritten with data from snapshot 20200514T045636.
Please verify that this is the correct restore host before continuing.
Type 'yes' to continue: yes

Starting restore of 10.0.1.171:122 with backup-utils v2.21 from snapshot 20200514T045636
Stopping cron and github-timerd ...
Restoring UUID ...
Restoring MySQL database from logical backup snapshot on an appliance configured for binary backups ...

@cainejette cainejette changed the title Output MySQL backup strategy being used in ghe-backup Output MySQL backup strategy being used in ghe-backup and ghe-restore May 14, 2020
Copy link
Member

@ryansimmen ryansimmen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@cainejette cainejette self-assigned this May 14, 2020
@cainejette cainejette requested a review from a team May 14, 2020 01:25
echo "Appliance is configured for logical backups."
fi

if is_binary_backup; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that possible:
The Appliance is configured for binary backups, but Backup being restored is a logical backup?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cainejette cainejette changed the title Output MySQL backup strategy being used in ghe-backup and ghe-restore Output MySQL backup strategy for clarity during backup and restore May 14, 2020
@cainejette cainejette merged commit 9cd5c50 into master May 14, 2020
@cainejette cainejette deleted the echo-msyql-backup-strategy branch May 14, 2020 20:01
This was referenced Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants