Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

controller: Add cluster backup endpoint #2115

Merged
merged 2 commits into from Dec 7, 2015
Merged

controller: Add cluster backup endpoint #2115

merged 2 commits into from Dec 7, 2015

Conversation

jvatic
Copy link
Contributor

@jvatic jvatic commented Nov 11, 2015

Closes #2095

}
if err := tw.WriteJSON("flynn.json", data); err != nil {
if err := clusterbackup.RunBackup(client, dest); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the package should be backup and the function Run, so this becomes backup.Run, WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that's simpler.

@lmars
Copy link
Contributor

lmars commented Nov 11, 2015

Is it worth adding a test for this? Hit /backup and check we get a tar with the relevant files in it?

@jvatic
Copy link
Contributor Author

jvatic commented Nov 11, 2015

  • Add integration test

@jvatic
Copy link
Contributor Author

jvatic commented Nov 11, 2015

@lmars comments addressed

@jvatic
Copy link
Contributor Author

jvatic commented Nov 13, 2015

  • Content-Disposition header should be set
  • should be able to use key param with this endpoint

- Cluster backup logic is now in pkg/clusterbackup
- `GET /backup` responds with a tar file (same as `flynn cluster backup`)

Signed-off-by: Jesse Stuart <jesse@jessestuart.ca>
Signed-off-by: Jesse Stuart <jesse@jessestuart.ca>
@lmars
Copy link
Contributor

lmars commented Dec 7, 2015

LGTM

jvatic added a commit that referenced this pull request Dec 7, 2015
controller: Add cluster backup endpoint
@jvatic jvatic merged commit 33c1b79 into master Dec 7, 2015
@jvatic jvatic deleted the controller-backup branch December 7, 2015 00:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants