Bug 1444613

Summary: oc export vs oc get --export inconsistencies with deployment configs
Product: OpenShift Container Platform Reporter: Aleksandar Kostadinov <akostadi>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED EOL QA Contact: Xingxing Xia <xxia>
Severity: low Docs Contact:
Priority: medium    
Version: unspecifiedCC: akhaire, aos-bugs, jokerman, mmccomas, pweil
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-21 08:46:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
oc output none

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!