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

Only attempt to restore Pages if we have a backup #50

Closed
wants to merge 2 commits into from

Conversation

lildude
Copy link
Member

@lildude lildude commented Aug 21, 2014

If a GitHub Enterprise appliance doesn't have any Pages generated or Pages have always been disabled on the appliance, there won't be a "Pages" directory to backup resulting in no "pages" directory in the backup when using rsync.

This causes a problem when restoring as ghe-restore-pages-rsync doesn't take this into account and fails with:

Starting rsync restore of ghe.vm from snapshot 20140821T133259
Connect ghe.vm OK (v11.10.343)
Enabling maintenance mode on ghe.vm ...
Restoring Git repositories ...
Restoring GitHub Pages ...
rsync: link_stat "/path/to/backup-utils/data/20140821T133259/pages/." failed: No such file or directory (2)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]

This PR corrects this so a restore of Pages over rsync will only be attempted if there is a backup to restore.

@rtomayko
Copy link
Contributor

Looks good. Added tests.

I'm going to merge this to master manually. I made the default branch "stable", which I'd like to always point to the latest release. Unfortunately this means PRs are automatically based there as well. I'm going to update the readme to suggest git clone -b stable ... and switch the default branch back to master to avoid this in the future.

@rtomayko
Copy link
Contributor

Merged to master. Closing....

@rtomayko rtomayko closed this Aug 21, 2014
@lildude lildude deleted the restore-pages branch August 21, 2014 17:18
rubiojr pushed a commit that referenced this pull request Nov 9, 2016
Backup and restore Hookshot logs from ES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants