commit de3962d5a0b99b70f440dc4cef2c43773097026f Author: Sheng Yang <sheng@yasker.org> Date: Fri Mar 22 19:51:13 2019 -0700 Longhorn v0.4.1 release
49 lines
1.3 KiB
Plaintext
49 lines
1.3 KiB
Plaintext
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: restore-to-file
|
|
namespace: longhorn-system
|
|
spec:
|
|
nodeName: <NODE_NAME>
|
|
containers:
|
|
- name: restore-to-file
|
|
command:
|
|
# set restore-to-file arguments here
|
|
- /bin/sh
|
|
- -c
|
|
- longhorn backup restore-to-file
|
|
'<BACKUP_URL>'
|
|
--output-file '/tmp/restore/<OUTPUT_FILE>'
|
|
--output-format <OUTPUT_FORMAT>
|
|
# the version of longhorn engine should be v0.4.1 or higher
|
|
image: rancher/longhorn-engine:v0.4.1
|
|
imagePullPolicy: IfNotPresent
|
|
securityContext:
|
|
privileged: true
|
|
volumeMounts:
|
|
- name: disk-directory
|
|
mountPath: /tmp/restore # the argument <output-file> should be in this directory
|
|
env:
|
|
# set Backup Target Credential Secret here.
|
|
- name: AWS_ACCESS_KEY_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: <S3_SECRET_NAME>
|
|
key: AWS_ACCESS_KEY_ID
|
|
- name: AWS_SECRET_ACCESS_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: <S3_SECRET_NAME>
|
|
key: AWS_SECRET_ACCESS_KEY
|
|
- name: AWS_ENDPOINTS
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: <S3_SECRET_NAME>
|
|
key: AWS_ENDPOINTS
|
|
volumes:
|
|
# the output file can be found on this host path
|
|
- name: disk-directory
|
|
hostPath:
|
|
path: /tmp/restore
|
|
restartPolicy: Never
|