Skip to content

Allow partial restores and restoring different backup series.#3547

Merged
martinmr merged 12 commits intomasterfrom
martinmr/restore-latest
Jun 13, 2019
Merged

Allow partial restores and restoring different backup series.#3547
martinmr merged 12 commits intomasterfrom
martinmr/restore-latest

Conversation

@martinmr
Copy link
Copy Markdown
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

martinmr added 3 commits June 7, 2019 14:51
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 a review from manishrjain as a code owner June 10, 2019 22:27
@martinmr martinmr requested a review from a team June 10, 2019 22:27
Comment thread ee/backup/file_handler.go Outdated
Comment thread ee/backup/s3_handler.go Outdated
Copy link
Copy Markdown
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
Comment thread ee/backup/s3_handler.go
@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