From 6f2d7d0170b5f29aade6b764e220ec3a8aa27cc7 Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Fri, 22 Mar 2019 19:23:16 -0700 Subject: [PATCH] Update restore-to-file.md --- docs/restore-to-file.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/restore-to-file.md b/docs/restore-to-file.md index bbdf782..e030f08 100644 --- a/docs/restore-to-file.md +++ b/docs/restore-to-file.md @@ -4,20 +4,24 @@ This command gives users the ability to restore a backup to a `raw` image or a ` ## Instruction 1. Copy the yaml template - 1.1 Without backing file: Make a copy of `examples/restore_to_file.yaml.template` as e.g. `restore.yaml`. - - 1.2 With backing file: Make a copy of `examples/restore_to_file_with_backing_file.yaml.template` as e.g. `restore.yaml`. + 1.1 Volume has no base image: Make a copy of `examples/restore_to_file.yaml.template` as e.g. `restore.yaml`. - 1.2.1 Set argument `backing-file` by replacing `` with your base image, e.g. `rancher/longhorn-test:baseimage-ext4`. + 1.2 Volume has a base image: Make a copy of `examples/restore_to_file_with_backing_file.yaml.template` as e.g. `restore.yaml`, and set argument `backing-file` by replacing `` with your base image, e.g. `rancher/longhorn-test:baseimage-ext4`. -1. Set host node on which the output file should be placed by replacing ``. +2. Set the node which the output file should be placed on by replacing ``, e.g. `node1`. -2. Specify the host path of output file by modifying field `hostpath` of volume `disk-directory`. By default the directory is `/tmp/restore/`. +3. Specify the host path of output file by modifying field `hostpath` of volume `disk-directory`. By default the directory is `/tmp/restore/`. -3. Set the first argument (backup url) by replacing ``, e.g. `s3://backupbucket@us-east-1/backupstore?backup=backup-bd326da2c4414b02&volume=volumeexamplename`. Do not delete `''`. +4. Set the first argument (backup url) by replacing ``, e.g. `s3://backupbucket@us-east-1/backupstore?backup=backup-bd326da2c4414b02&volume=volumeexamplename`. Do not delete `''`. -4. Set argument `output-file` by replacing ``, e.g. `volume.raw` or `volume.qcow2`. +5. Set argument `output-file` by replacing ``, e.g. `volume.raw` or `volume.qcow2`. -5. Set argument `output-format` by replacing ``. Now support `raw` or `qcow2` only. +6. Set argument `output-format` by replacing ``. Now support `raw` or `qcow2` only. -6. Set S3 Credential Secret by replacing ``, e.g. `minio-secret`. +7. Set S3 Credential Secret by replacing ``, e.g. `minio-secret`. + +8. Execute the yaml using e.g. `kubectl create -f restore.yaml`. + +9. Watching the result using `kubectl -n longhorn-system get pod restore-to-file -w` + +After the pod status changed to `Completed`, you should able to find `` at e.g. `/tmp/restore` on the ``.