-
Notifications
You must be signed in to change notification settings - Fork 1
Using OpenShift Origin Client (OC)
Markus Kalijärvi edited this page Sep 12, 2022
·
6 revisions
You need openshift-cli to your local to use these instructions.
If you are a mac user you can install it from homebrew: brew install openshift-cli
- Obtain access token by visiting https://oauth-openshift.apps.arodevtest.hel.fi/oauth/token/request
- Login using your token:
oc login --token=sha256~your-token --server=https://api.arodevtest.hel.fi:6443
- List available projects:
oc projects - Select project
oc project {project_name}
You must select project first, see Projects
- List available pods:
oc get pods - SSH into pod (must be in Running state):
oc rsh pod-name.
Replace pod-name with a pod name from oc get pods. For example drupal-xxx-something.
- Run
oc rsh pod-name drush sql:dump --structure-tables-key=common --result-file=/tmp/dump.sqlto dump the database. - Run
oc rsync pod-name:/tmp/dump.sql .to copy the dump to your local machine. - Remove SQL dump:
oc rsh pod-name rm /tmp/dump.sql.