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

Allow partial restores and restoring different backup series. #3547

Merged
merged 12 commits into from
Jun 13, 2019

Conversation

martinmr
Copy link
Contributor

@martinmr martinmr commented Jun 10, 2019

Add a last_dir flag to the restore command that indicates to the restore
that any backup directories created after should be ignored. This
enables partial restores and restores of different backup series in
backup directories that include multiple series of full and incremental
backups.


This change is Reviewable

This PR modfies the restore logic so that the restore only consideres
the backups starting from the latest full backup. Future changes will
allow users to specify which series of backups to restore but this is a
first step which introduces a sane default.
Add a last_dir flag to the restore command that indicates to the restore
that any backup directories created after should be ignored. This
enables partial restores and restores of different backup series in
backup directories that include multiple series of full and incremental
backups.
@martinmr martinmr requested review from manishrjain and a team as code owners June 10, 2019 22:27
ee/backup/file_handler.go Outdated Show resolved Hide resolved
ee/backup/s3_handler.go Outdated Show resolved Hide resolved
Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 3 of 6 files at r1, 3 of 3 files at r2.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @martinmr)


ee/backup/handler.go, line 183 at r2 (raw file):

type manifestFile struct {
	path     string

Just put path within the Manifest struct and mark so JSON won't marshal it.

Field int json:"-"

@martinmr martinmr changed the base branch from martinmr/restore-upto-full to master June 12, 2019 23:44
@martinmr martinmr merged commit b96c297 into master Jun 13, 2019
@martinmr martinmr deleted the martinmr/restore-latest branch June 13, 2019 15:03
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 19, 2019
…-io#3547)

Add a last_dir flag to the restore command that indicates to the restore
that any backup directories created after should be ignored. This
enables partial restores and restores of different backup series in
backup directories that include multiple series of full and incremental
backups.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants