Skip to content

Rewrite UCP backup/restore and improve uninstall and support guides #1785

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

Merged

Conversation

alexmavr
Copy link
Contributor

@alexmavr alexmavr commented Feb 16, 2017

Signed-off-by: Alex Mavrogiannis [email protected]

Proposed changes

You need to run the backup command on a UCP manager node. Since UCP stores
the same data on all manager nodes, you only need to create a backup of a
single node.
To create a UCP backup, you may use the `{{ page.docker_image }} backup` command
Copy link
Contributor

Choose a reason for hiding this comment

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

This is way more complete, but you sound like a boring lecturer in some sentences. Try writing like you speak.

What about

To create a backup of UCP, you can run the {{ page.docker_image }} backup command on a UCP manager node. <you don't need to tell me you're going to explain something below. If it's interesting I'm going to continue reading>
This command creates a tar archive...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Understood. Please read my response to your comment in the next paragraph.

Oh wait.

UCP](../architecture.md) to persist data and streams it to stdout.

You only need to run the backup command on a single UCP manager node. Since UCP
stores the same data on all manager nodes, you do not need to capture periodic
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe the other way around will be more obvious

"Since UCP stores the same data on all manager nodes, you only need to make periodic backups of a single node"

Copy link
Contributor

@joaofnfernandes joaofnfernandes left a comment

Choose a reason for hiding this comment

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

This looks really good!

containers and services are not affected by this.
resources, such as services, containers and stacks are not affected by this
operation and will continue operating as expected. Any long-lasting `exec`,
`logs`, `events` or `attach` operations against the affected manager node will
Copy link
Contributor

Choose a reason for hiding this comment

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

Internally we use the word "against" a lot but when reading things for the first time, that word is a bit ambiguous. Maybe

"If you're running commands like exec, logs, events, or attach on a manager node, when performing a backup those commands will be disconnected."

-v /var/run/docker.sock:/var/run/docker.sock \
{{ page.docker_image }} backup --interactive /tmp/backup.tar

# Ensure the backup is a valid tar and list its contents
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we include a bit more information on what to visually search for. I'll see a list of files, but I'll have no idea whether they contain all the data or not.

The restore command can be used to create a new UCP cluster from a backup file.
After the restore operation is complete, the following data will be recovered
from the backup file:
* Users, Teams and Permissions.
Copy link
Contributor

Choose a reason for hiding this comment

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

We only capitalize product names, not concepts or features.

After the restore operation is complete, the following data will be recovered
from the backup file:
* Users, Teams and Permissions.
* All UCP Configuration options available under `Admin Settings`, such as the
Copy link
Contributor

Choose a reason for hiding this comment

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

Configuration -> configuration
Subscription->subscription

DDC Subscription license, scheduling options, Content Trust and authentication
backends.

There restore operation can be performed in any of three environments:
Copy link
Contributor

Choose a reason for hiding this comment

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

There -> The
You say "three environments" but you only list two. Also you can make it a bit more straightforward like

"There are two ways to restore a UCP cluster"

{{ page.docker_image }} restore -i
```

## Restore your cluster
## Disaster Recovery
Copy link
Contributor

Choose a reason for hiding this comment

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

Only capitalize the first word of a title (and product names)


2. On the top-right menu, **click your username**, and choose **Support Dump**.
An archive will be downloaded by your browser after a brief time interval.

If the User Interface is not accessible, you may perform the following number of
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to capitalize "user interface" too

@alexmavr
Copy link
Contributor Author

alexmavr commented Feb 17, 2017

Added a commit which addresses comments and adds a few minor tweaks to the actual backup/restore commands that I discovered while actually going through the disaster recovery scenario.

@joaofnfernandes PTAL

@joaofnfernandes
Copy link
Contributor

Everything looks good. Can you just address the comment on backups-and-disaster-recovery.md line 18?

@alexmavr alexmavr force-pushed the backup-restore-support-uninstall branch from 4e1832b to 1f1da00 Compare February 17, 2017 00:33
@alexmavr
Copy link
Contributor Author

I did, not sure what you're referring to. I just amended the commit to rewrite that line word-for-word as per your recommendation, so I hope that checks out

@vikstrous
Copy link
Contributor

Does a ucp backup include a swarm backup? Also, by reading the swarm backup docs it's not clear to me what a swarm backup does.

@alexmavr
Copy link
Contributor Author

No, the UCP backup does not include a swarm backup. I think the swarm backup captures the set of services, node and CA keys and swarm-scoped configuration. The only actual things that is affected by UCP not performing a swarm backup is that services are not restored as part of the backup.

Given that it's possible to restore UCP on a different swarm cluster with a different set of services running, this might not be a feature worth pursuing. Additionally, instrumenting a swarm backup may prove to be challenging from UCP's perspective depending on whether the raft store should be unlocked for the backup or not.

@joaofnfernandes
Copy link
Contributor

That's an awesome question @vikstrous. Can we include something that states that the UCP backup command doesn't backup the cluster information like services, networks, ...
And maybe link to the swarm backup docs /engine/swarm/admin_guide/#/back-up-the-swarm

@alexmavr alexmavr force-pushed the backup-restore-support-uninstall branch from 1f1da00 to 514decd Compare February 17, 2017 02:43
@alexmavr alexmavr force-pushed the backup-restore-support-uninstall branch from 514decd to f348bfb Compare February 17, 2017 18:23
Copy link
Contributor

@joaofnfernandes joaofnfernandes left a comment

Choose a reason for hiding this comment

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

Minor nitpicks, but we're almost there!

To have minimal impact on your business, you should:
Additionally, if UCP is not configured for high availability, you will be
temporarily unable to:
* Log in to the UCP Web UI
Copy link
Contributor

Choose a reason for hiding this comment

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

Our markdown renderer requires a space before list items 😓
screen shot 2017-02-17 at 11 52 21


* Schedule the backup to take place outside business hours.
To minimize the impact of the backup policy on your business, you should:
Copy link
Contributor

Choose a reason for hiding this comment

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

Add \n here too

The example below shows how to create a backup of a UCP manager node and
verify its contents:

```bash
Copy link
Contributor

Choose a reason for hiding this comment

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

Our syntax highlighting is all crazy so change this to none.

screen shot 2017-02-17 at 11 53 55

DDC subscription license, scheduling options, Content Trust and authentication
backends.

There are two ways to restore a UCP cluster:
Copy link
Contributor

Choose a reason for hiding this comment

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

Add \n here too

Signed-off-by: Alex Mavrogiannis <[email protected]>
@alexmavr
Copy link
Contributor Author

Addressed comments in new commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document that ucp-reconcile being stopped is not bad How to backup and restore UCP
3 participants