Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1511257 - [DOCS] document backup + restore procedure for v3 etcd schema
Summary: [DOCS] document backup + restore procedure for v3 etcd schema
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.6.z
Assignee: Alex Dellapenta
QA Contact: Gaoyun Pei
Vikram Goyal
URL:
Whiteboard: 3.10-release-plan
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-09 01:42 UTC by Steven Walter
Modified: 2018-09-06 21:32 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-20 15:27:31 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1981013 None None None 2018-01-09 22:52:49 UTC

Description Steven Walter 2017-11-09 01:42:14 UTC
Document URL: 
https://docs.openshift.com/container-platform/3.6/admin_guide/backup_restore.html


Section Number and Name: 
All


Describe the issue: 
It is uncertain if the current backup + restore documentation applies for the new etcd schema (v3). It looks like the document is identical with 3.5 and very similar to 3.4.



Suggestions for improvement: 
If the backup/restore process is the same, we should note in the introduction to the document that the same process applies. If not, we need to document the new procedure.

This could become important to avoid customers losing data due to being unable to follow backup + restore procedure.

Comment 1 Steven Walter 2017-11-14 18:58:07 UTC
Customer wants to know if they should be safe to use:

`ETCDCTL_API=3 etcdctl snapshot save` command for performing ETCD backups.

Comment 2 Ryan Howe 2018-01-09 22:47:15 UTC
# export ETCDCTL_API=3
# source /etc/etcd/etcd.conf

# etcdctl --cert=$ETCD_PEER_CERT_FILE \
   --key=$ETCD_PEER_KEY_FILE \
   --cacert=$ETCD_TRUSTED_CA_FILE \
   --endpoints=$ETCD_LISTEN_CLIENT_URLS \
    snapshot save snapshot.db

  # etcdctl  --cert=$ETCD_PEER_CERT_FILE \
    --key=$ETCD_PEER_KEY_FILE \
    --cacert=$ETCD_TRUSTED_CA_FILE \
     snapshot restore snapshot.db \
    --name $ETCD_NAME \
    --initial-cluster $ETCD_INITIAL_CLUSTER \
    --initial-cluster-token $ETCD_INITIAL_CLUSTER_TOKEN \
    --initial-advertise-peer-urls $ETCD_INITIAL_ADVERTISE_PEER_URLS

Comment 6 Scott Dodson 2018-01-24 17:24:15 UTC
Step #3 here covers v3 backup.

https://docs.openshift.com/container-platform/3.6/admin_guide/backup_restore.html#etcd-backup

"Copy the db file over to the backup you created:

# cp "$ETCD_DATA_DIR"/member/snap/db "$HOTDIR"/member/snap/db'"

Comment 7 Scott Dodson 2018-01-24 17:25:48 UTC
Perhaps update that heading to make it clear that step #2 captures v2 data and #3 captures v3 data. Both steps are required in any environment running etcd 3.x

Comment 8 Alex Dellapenta 2018-05-23 21:07:28 UTC
This has been better addressed in the new Day 2 Guide, however that only was published in OCP 3.7 and later docs (and this BZ was opened against 3.6):

https://docs.openshift.com/container-platform/3.7/day_two_guide/host_level_tasks.html#day-two-guide-etcd-backup

Kathryn is also working on related etcd disaster recovery documentation improvements via https://bugzilla.redhat.com/show_bug.cgi?id=1442118, and from speaking with her it may heavily impact or deprecate this existing topic. However, it's not clear yet if that work will get backported all the way to 3.6. I'm still working with her on this, and should have a better action plan tomorrow.

Comment 10 Alex Dellapenta 2018-07-09 17:06:21 UTC
Updated docs published for 3.7+ via https://bugzilla.redhat.com/show_bug.cgi?id=1442118.

Relevant updates need backporting to 3.6 for this BZ.

Comment 13 Gaoyun Pei 2018-08-20 08:08:51 UTC
From previous comments and the target branch of PR https://github.com/openshift/openshift-docs/pull/11540, it should be a 3.6.z targeted bug. 

And https://github.com/openshift/openshift-docs/pull/11540 lgtm, thanks.


Note You need to log in before you can comment on or make changes to this bug.