Bug 1444613 - oc export vs oc get --export inconsistencies with deployment configs
Summary: oc export vs oc get --export inconsistencies with deployment configs
Keywords:
Status: CLOSED EOL
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-23 09:28 UTC by Aleksandar Kostadinov
Modified: 2019-12-10 12:23 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-21 08:46:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
oc output (7.08 KB, text/plain)
2017-04-23 09:28 UTC, Aleksandar Kostadinov
no flags Details

Description Aleksandar Kostadinov 2017-04-23 09:28:06 UTC
Created attachment 1273446 [details]
oc output

Description of problem:
`oc export` and `oc get -o yaml --export=true` differ in output format. I would suggest to bring them into consistency.

You can see pasted output from both commands. `oc get` prints an empty `status` and also prints wrong and useless `metadata->selfLink`.

`oc export` prints some useless things in `status`.

I believe it is better to not print `status` at all as well do not print `selfLink`. 

Version-Release number of selected component (if applicable):
oc v3.6.41
kubernetes v1.5.2+43a9be4

How reproducible:
always

Steps to Reproduce:
1. oc get -o yaml --export=true dc/somedc
2. oc export dc somedc

Actual results:
useless data as explained above

Expected results:
clean resource data ready to be created

Comment 1 Maciej Szulik 2019-08-21 08:46:33 UTC
Closing due to age, also export command was removed and --export flag for get command is deprecated at this point

Comment 2 Aleksandar Kostadinov 2019-08-22 08:48:40 UTC
I know that `export` is gone. I now see that `--export` is deprecated. What is current supported way to backup objects/resources?

Comment 3 Maciej Szulik 2019-08-22 12:03:39 UTC
oc get -o yaml|json and remove the fields on the client side (as in through an external program). The reason we went with this is that each customer has different needs for what should be removed. That's why we're moving that responsibility to customers.

Comment 4 Aleksandar Kostadinov 2019-08-22 12:20:51 UTC
Thank you very much for providing rational behind this decision!


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