Skip to content

Commit

Permalink
Docs for CopyVolumeData function (#4154)
Browse files Browse the repository at this point in the history
* Docs for CopyVolumeData function

* Address review comments
  • Loading branch information
Vaibhav Kamra authored and Ilya Kislenko committed Oct 17, 2018
1 parent 1ecfd8d commit 76ba064
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
52 changes: 52 additions & 0 deletions docs/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ Example:
- |
cp /restore-data/file_to_replace.data /data/file.data
.. _backupdata:

BackupData
----------

Expand Down Expand Up @@ -294,6 +296,8 @@ Example:
backupArtifactPrefix: s3-bucket/path/artifactPrefix
backupIdentifier: "{{ .Time }}"
.. _restoredata:

RestoreData
-----------

Expand Down Expand Up @@ -351,6 +355,54 @@ Example:
backupArtifactPrefix: s3-bucket/path/artifactPrefix
backupIdentifier: "{{ .Time }}"
CopyVolumeData
--------------

This function copies data from the specified volume (referenced by a
Kubernetes PersistentVolumeClaim) into an object store.
This data can be restored into a volume using the :ref:`restoredata`
function

.. note::
The PVC must not be in-use (attached to a running Pod)

If data needs to be copied from a running workload without stopping
it, use the :ref:`backupdata` function

Arguments:

.. csv-table::
:header: "Argument", "Required", "Type", "Description"
:align: left
:widths: 5,5,5,15

`namespace`, Yes, `string`, namespace the source PVC is in
`volume`, Yes, `string`, name of the source PVC
`dataArtifactPrefix`, Yes, `string`, path on the object store to store the data in

Outputs:

.. csv-table::
:header: "Output", "Type", "Description"
:align: left
:widths: 5,5,15

`backupArtifactLocation`,`string`, location in objectstore where data was copied
`backupID`,`string`, unique string to identify this data copy

Example:

If the ActionSet `Object` is a PersistentVolumeClaim:

.. code-block:: yaml
:linenos:
- func: CopyVolumeData
args:
namespace: "{{ .PVC.Namespace }}"
volume: "{{ .PVC.Name }}"
dataArtifactPrefix: s3-bucket-name/path
DeleteData
----------

Expand Down
3 changes: 3 additions & 0 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ defaultProfile
Kando
kando
Dockerfile
PersistentVolumeClaim
actionset
objectstore

0 comments on commit 76ba064

Please sign in to comment.