mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-28 14:08:55 +00:00
724 lines
30 KiB
JavaScript
724 lines
30 KiB
JavaScript
"use strict";
|
|
(self["webpackChunkrancher_docs"] = self["webpackChunkrancher_docs"] || []).push([[34564],{
|
|
|
|
/***/ 3905:
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Zo: () => (/* binding */ MDXProvider),
|
|
/* harmony export */ kt: () => (/* binding */ createElement)
|
|
/* harmony export */ });
|
|
/* unused harmony exports MDXContext, useMDXComponents, withMDXComponents */
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67294);
|
|
|
|
|
|
function _defineProperty(obj, key, value) {
|
|
if (key in obj) {
|
|
Object.defineProperty(obj, key, {
|
|
value: value,
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true
|
|
});
|
|
} else {
|
|
obj[key] = value;
|
|
}
|
|
|
|
return obj;
|
|
}
|
|
|
|
function _extends() {
|
|
_extends = Object.assign || function (target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i];
|
|
|
|
for (var key in source) {
|
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
}
|
|
|
|
return target;
|
|
};
|
|
|
|
return _extends.apply(this, arguments);
|
|
}
|
|
|
|
function ownKeys(object, enumerableOnly) {
|
|
var keys = Object.keys(object);
|
|
|
|
if (Object.getOwnPropertySymbols) {
|
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
});
|
|
keys.push.apply(keys, symbols);
|
|
}
|
|
|
|
return keys;
|
|
}
|
|
|
|
function _objectSpread2(target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
|
|
if (i % 2) {
|
|
ownKeys(Object(source), true).forEach(function (key) {
|
|
_defineProperty(target, key, source[key]);
|
|
});
|
|
} else if (Object.getOwnPropertyDescriptors) {
|
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
} else {
|
|
ownKeys(Object(source)).forEach(function (key) {
|
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
});
|
|
}
|
|
}
|
|
|
|
return target;
|
|
}
|
|
|
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
if (source == null) return {};
|
|
var target = {};
|
|
var sourceKeys = Object.keys(source);
|
|
var key, i;
|
|
|
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
key = sourceKeys[i];
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
target[key] = source[key];
|
|
}
|
|
|
|
return target;
|
|
}
|
|
|
|
function _objectWithoutProperties(source, excluded) {
|
|
if (source == null) return {};
|
|
|
|
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
|
|
var key, i;
|
|
|
|
if (Object.getOwnPropertySymbols) {
|
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
|
|
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
key = sourceSymbolKeys[i];
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
|
|
return target;
|
|
}
|
|
|
|
var isFunction = function isFunction(obj) {
|
|
return typeof obj === 'function';
|
|
};
|
|
|
|
var MDXContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({});
|
|
var withMDXComponents = function withMDXComponents(Component) {
|
|
return function (props) {
|
|
var allComponents = useMDXComponents(props.components);
|
|
return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
components: allComponents
|
|
}));
|
|
};
|
|
};
|
|
var useMDXComponents = function useMDXComponents(components) {
|
|
var contextComponents = react__WEBPACK_IMPORTED_MODULE_0__.useContext(MDXContext);
|
|
var allComponents = contextComponents;
|
|
|
|
if (components) {
|
|
allComponents = isFunction(components) ? components(contextComponents) : _objectSpread2(_objectSpread2({}, contextComponents), components);
|
|
}
|
|
|
|
return allComponents;
|
|
};
|
|
var MDXProvider = function MDXProvider(props) {
|
|
var allComponents = useMDXComponents(props.components);
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(MDXContext.Provider, {
|
|
value: allComponents
|
|
}, props.children);
|
|
};
|
|
|
|
var TYPE_PROP_NAME = 'mdxType';
|
|
var DEFAULTS = {
|
|
inlineCode: 'code',
|
|
wrapper: function wrapper(_ref) {
|
|
var children = _ref.children;
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, {}, children);
|
|
}
|
|
};
|
|
var MDXCreateElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function (props, ref) {
|
|
var propComponents = props.components,
|
|
mdxType = props.mdxType,
|
|
originalType = props.originalType,
|
|
parentName = props.parentName,
|
|
etc = _objectWithoutProperties(props, ["components", "mdxType", "originalType", "parentName"]);
|
|
|
|
var components = useMDXComponents(propComponents);
|
|
var type = mdxType;
|
|
var Component = components["".concat(parentName, ".").concat(type)] || components[type] || DEFAULTS[type] || originalType;
|
|
|
|
if (propComponents) {
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component, _objectSpread2(_objectSpread2({
|
|
ref: ref
|
|
}, etc), {}, {
|
|
components: propComponents
|
|
}));
|
|
}
|
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component, _objectSpread2({
|
|
ref: ref
|
|
}, etc));
|
|
});
|
|
MDXCreateElement.displayName = 'MDXCreateElement';
|
|
function createElement (type, props) {
|
|
var args = arguments;
|
|
var mdxType = props && props.mdxType;
|
|
|
|
if (typeof type === 'string' || mdxType) {
|
|
var argsLength = args.length;
|
|
var createElementArgArray = new Array(argsLength);
|
|
createElementArgArray[0] = MDXCreateElement;
|
|
var newProps = {};
|
|
|
|
for (var key in props) {
|
|
if (hasOwnProperty.call(props, key)) {
|
|
newProps[key] = props[key];
|
|
}
|
|
}
|
|
|
|
newProps.originalType = type;
|
|
newProps[TYPE_PROP_NAME] = typeof type === 'string' ? type : mdxType;
|
|
createElementArgArray[1] = newProps;
|
|
|
|
for (var i = 2; i < argsLength; i++) {
|
|
createElementArgArray[i] = args[i];
|
|
}
|
|
|
|
return react__WEBPACK_IMPORTED_MODULE_0__.createElement.apply(null, createElementArgArray);
|
|
}
|
|
|
|
return react__WEBPACK_IMPORTED_MODULE_0__.createElement.apply(null, args);
|
|
}
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 57821:
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ assets: () => (/* binding */ assets),
|
|
/* harmony export */ contentTitle: () => (/* binding */ contentTitle),
|
|
/* harmony export */ "default": () => (/* binding */ MDXContent),
|
|
/* harmony export */ frontMatter: () => (/* binding */ frontMatter),
|
|
/* harmony export */ metadata: () => (/* binding */ metadata),
|
|
/* harmony export */ toc: () => (/* binding */ toc)
|
|
/* harmony export */ });
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67294);
|
|
/* harmony import */ var _mdx_js_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3905);
|
|
/* @jsxRuntime classic */ /* @jsx mdx */ /* @jsxFrag React.Fragment */ function _define_property(obj, key, value) {
|
|
if (key in obj) {
|
|
Object.defineProperty(obj, key, {
|
|
value: value,
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true
|
|
});
|
|
} else {
|
|
obj[key] = value;
|
|
}
|
|
return obj;
|
|
}
|
|
function _object_spread(target) {
|
|
for(var i = 1; i < arguments.length; i++){
|
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
var ownKeys = Object.keys(source);
|
|
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
}));
|
|
}
|
|
ownKeys.forEach(function(key) {
|
|
_define_property(target, key, source[key]);
|
|
});
|
|
}
|
|
return target;
|
|
}
|
|
function ownKeys(object, enumerableOnly) {
|
|
var keys = Object.keys(object);
|
|
if (Object.getOwnPropertySymbols) {
|
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
if (enumerableOnly) {
|
|
symbols = symbols.filter(function(sym) {
|
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
});
|
|
}
|
|
keys.push.apply(keys, symbols);
|
|
}
|
|
return keys;
|
|
}
|
|
function _object_spread_props(target, source) {
|
|
source = source != null ? source : {};
|
|
if (Object.getOwnPropertyDescriptors) {
|
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
} else {
|
|
ownKeys(Object(source)).forEach(function(key) {
|
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
});
|
|
}
|
|
return target;
|
|
}
|
|
function _object_without_properties(source, excluded) {
|
|
if (source == null) return {};
|
|
var target = _object_without_properties_loose(source, excluded);
|
|
var key, i;
|
|
if (Object.getOwnPropertySymbols) {
|
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
key = sourceSymbolKeys[i];
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
return target;
|
|
}
|
|
function _object_without_properties_loose(source, excluded) {
|
|
if (source == null) return {};
|
|
var target = {};
|
|
var sourceKeys = Object.keys(source);
|
|
var key, i;
|
|
for(i = 0; i < sourceKeys.length; i++){
|
|
key = sourceKeys[i];
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
target[key] = source[key];
|
|
}
|
|
return target;
|
|
}
|
|
|
|
|
|
const frontMatter = {
|
|
title: 'Backup and Restore Examples'
|
|
};
|
|
const contentTitle = undefined;
|
|
const metadata = {
|
|
"unversionedId": "reference-guides/backup-restore-configuration/examples",
|
|
"id": "version-2.8/reference-guides/backup-restore-configuration/examples",
|
|
"title": "Backup and Restore Examples",
|
|
"description": "This section contains examples of Backup and Restore custom resources.",
|
|
"source": "@site/versioned_docs/version-2.8/reference-guides/backup-restore-configuration/examples.md",
|
|
"sourceDirName": "reference-guides/backup-restore-configuration",
|
|
"slug": "/reference-guides/backup-restore-configuration/examples",
|
|
"permalink": "/v2.8/reference-guides/backup-restore-configuration/examples",
|
|
"draft": false,
|
|
"editUrl": "https://github.com/rancher/rancher-docs/edit/main/versioned_docs/version-2.8/reference-guides/backup-restore-configuration/examples.md",
|
|
"tags": [],
|
|
"version": "2.8",
|
|
"lastUpdatedAt": 1705516250,
|
|
"formattedLastUpdatedAt": "Jan 17, 2024",
|
|
"frontMatter": {
|
|
"title": "Backup and Restore Examples"
|
|
},
|
|
"sidebar": "tutorialSidebar",
|
|
"previous": {
|
|
"title": "Backup Storage Location Configuration",
|
|
"permalink": "/v2.8/reference-guides/backup-restore-configuration/storage-configuration"
|
|
},
|
|
"next": {
|
|
"title": "Kubernetes Concepts",
|
|
"permalink": "/v2.8/reference-guides/kubernetes-concepts"
|
|
}
|
|
};
|
|
const assets = {};
|
|
const toc = [
|
|
{
|
|
value: 'Backup',
|
|
id: 'backup',
|
|
level: 2
|
|
},
|
|
{
|
|
value: 'Backup in the Default Location with Encryption',
|
|
id: 'backup-in-the-default-location-with-encryption',
|
|
level: 3
|
|
},
|
|
{
|
|
value: 'Recurring Backup in the Default Location',
|
|
id: 'recurring-backup-in-the-default-location',
|
|
level: 3
|
|
},
|
|
{
|
|
value: 'Encrypted Recurring Backup in the Default Location',
|
|
id: 'encrypted-recurring-backup-in-the-default-location',
|
|
level: 3
|
|
},
|
|
{
|
|
value: 'Encrypted Backup in Minio',
|
|
id: 'encrypted-backup-in-minio',
|
|
level: 3
|
|
},
|
|
{
|
|
value: 'Backup in S3 Using AWS Credential Secret',
|
|
id: 'backup-in-s3-using-aws-credential-secret',
|
|
level: 3
|
|
},
|
|
{
|
|
value: 'Recurring Backup in S3 Using AWS Credential Secret',
|
|
id: 'recurring-backup-in-s3-using-aws-credential-secret',
|
|
level: 3
|
|
},
|
|
{
|
|
value: 'Backup from EC2 Nodes with IAM Permission to Access S3',
|
|
id: 'backup-from-ec2-nodes-with-iam-permission-to-access-s3',
|
|
level: 3
|
|
},
|
|
{
|
|
value: 'Restore',
|
|
id: 'restore',
|
|
level: 2
|
|
},
|
|
{
|
|
value: 'Restore Using the Default Backup File Location',
|
|
id: 'restore-using-the-default-backup-file-location',
|
|
level: 3
|
|
},
|
|
{
|
|
value: 'Restore for Rancher Migration',
|
|
id: 'restore-for-rancher-migration',
|
|
level: 3
|
|
},
|
|
{
|
|
value: 'Restore from Encrypted Backup',
|
|
id: 'restore-from-encrypted-backup',
|
|
level: 3
|
|
},
|
|
{
|
|
value: 'Restore an Encrypted Backup from Minio',
|
|
id: 'restore-an-encrypted-backup-from-minio',
|
|
level: 3
|
|
},
|
|
{
|
|
value: 'Restore from Backup Using an AWS Credential Secret to Access S3',
|
|
id: 'restore-from-backup-using-an-aws-credential-secret-to-access-s3',
|
|
level: 3
|
|
},
|
|
{
|
|
value: 'Restore from EC2 Nodes with IAM Permissions to Access S3',
|
|
id: 'restore-from-ec2-nodes-with-iam-permissions-to-access-s3',
|
|
level: 3
|
|
},
|
|
{
|
|
value: 'Example EncryptionConfiguration',
|
|
id: 'example-encryptionconfiguration',
|
|
level: 2
|
|
}
|
|
];
|
|
const layoutProps = {
|
|
toc
|
|
};
|
|
const MDXLayout = "wrapper";
|
|
function MDXContent(_param) {
|
|
var { components } = _param, props = _object_without_properties(_param, [
|
|
"components"
|
|
]);
|
|
return /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)(MDXLayout, _object_spread_props(_object_spread({}, layoutProps, props), {
|
|
components: components,
|
|
mdxType: "MDXLayout"
|
|
}), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("head", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("link", {
|
|
rel: "canonical",
|
|
href: "https://ranchermanager.docs.rancher.com/reference-guides/backup-restore-configuration/examples"
|
|
})), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `This section contains examples of Backup and Restore custom resources.`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `The default backup storage location is configured when the `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("inlineCode", {
|
|
parentName: "p"
|
|
}, `rancher-backup`), ` operator is installed or upgraded.`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `Encrypted backups can only be restored if the Restore custom resource uses the same encryption configuration secret that was used to create the backup.`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h2", {
|
|
"id": "backup"
|
|
}, `Backup`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `This section contains example Backup custom resources.`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("blockquote", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", {
|
|
parentName: "blockquote"
|
|
}, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("strong", {
|
|
parentName: "p"
|
|
}, `Note:`), ` Refer to the `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/v2.8/reference-guides/backup-restore-configuration/backup-configuration"
|
|
}, `backup config reference page`), ` for more information on configuring the options below.`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h3", {
|
|
"id": "backup-in-the-default-location-with-encryption"
|
|
}, `Backup in the Default Location with Encryption`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("pre", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("code", {
|
|
parentName: "pre",
|
|
"className": "language-yaml"
|
|
}, `apiVersion: resources.cattle.io/v1
|
|
kind: Backup
|
|
metadata:
|
|
name: default-location-encrypted-backup
|
|
spec:
|
|
resourceSetName: rancher-resource-set
|
|
encryptionConfigSecretName: encryptionconfig
|
|
`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h3", {
|
|
"id": "recurring-backup-in-the-default-location"
|
|
}, `Recurring Backup in the Default Location`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("pre", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("code", {
|
|
parentName: "pre",
|
|
"className": "language-yaml"
|
|
}, `apiVersion: resources.cattle.io/v1
|
|
kind: Backup
|
|
metadata:
|
|
name: default-location-recurring-backup
|
|
spec:
|
|
resourceSetName: rancher-resource-set
|
|
schedule: "@every 1h"
|
|
retentionCount: 10
|
|
`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h3", {
|
|
"id": "encrypted-recurring-backup-in-the-default-location"
|
|
}, `Encrypted Recurring Backup in the Default Location`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("pre", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("code", {
|
|
parentName: "pre",
|
|
"className": "language-yaml"
|
|
}, `apiVersion: resources.cattle.io/v1
|
|
kind: Backup
|
|
metadata:
|
|
name: default-enc-recurring-backup
|
|
spec:
|
|
resourceSetName: rancher-resource-set
|
|
encryptionConfigSecretName: encryptionconfig
|
|
schedule: "@every 1h"
|
|
retentionCount: 3
|
|
`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h3", {
|
|
"id": "encrypted-backup-in-minio"
|
|
}, `Encrypted Backup in Minio`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("pre", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("code", {
|
|
parentName: "pre",
|
|
"className": "language-yaml"
|
|
}, `apiVersion: resources.cattle.io/v1
|
|
kind: Backup
|
|
metadata:
|
|
name: minio-backup
|
|
spec:
|
|
storageLocation:
|
|
s3:
|
|
credentialSecretName: minio-creds
|
|
credentialSecretNamespace: default
|
|
bucketName: rancherbackups
|
|
endpoint: minio.xip.io
|
|
endpointCA: <base64-encoded-cert>
|
|
resourceSetName: rancher-resource-set
|
|
encryptionConfigSecretName: encryptionconfig
|
|
`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h3", {
|
|
"id": "backup-in-s3-using-aws-credential-secret"
|
|
}, `Backup in S3 Using AWS Credential Secret`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("pre", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("code", {
|
|
parentName: "pre",
|
|
"className": "language-yaml"
|
|
}, `apiVersion: resources.cattle.io/v1
|
|
kind: Backup
|
|
metadata:
|
|
name: s3-backup
|
|
spec:
|
|
storageLocation:
|
|
s3:
|
|
credentialSecretName: s3-creds
|
|
credentialSecretNamespace: default
|
|
bucketName: rancher-backups
|
|
folder: ecm1
|
|
region: us-west-2
|
|
endpoint: s3.us-west-2.amazonaws.com
|
|
resourceSetName: rancher-resource-set
|
|
encryptionConfigSecretName: encryptionconfig
|
|
`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h3", {
|
|
"id": "recurring-backup-in-s3-using-aws-credential-secret"
|
|
}, `Recurring Backup in S3 Using AWS Credential Secret`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("pre", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("code", {
|
|
parentName: "pre",
|
|
"className": "language-yaml"
|
|
}, `apiVersion: resources.cattle.io/v1
|
|
kind: Backup
|
|
metadata:
|
|
name: s3-recurring-backup
|
|
spec:
|
|
storageLocation:
|
|
s3:
|
|
credentialSecretName: s3-creds
|
|
credentialSecretNamespace: default
|
|
bucketName: rancher-backups
|
|
folder: ecm1
|
|
region: us-west-2
|
|
endpoint: s3.us-west-2.amazonaws.com
|
|
resourceSetName: rancher-resource-set
|
|
encryptionConfigSecretName: encryptionconfig
|
|
schedule: "@every 1h"
|
|
retentionCount: 10
|
|
`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h3", {
|
|
"id": "backup-from-ec2-nodes-with-iam-permission-to-access-s3"
|
|
}, `Backup from EC2 Nodes with IAM Permission to Access S3`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `This example shows that the AWS credential secret does not have to be provided to create a backup if the nodes running `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("inlineCode", {
|
|
parentName: "p"
|
|
}, `rancher-backup`), ` have `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/v2.8/reference-guides/backup-restore-configuration/backup-configuration#iam-permissions-for-ec2-nodes-to-access-s3"
|
|
}, `these permissions for access to S3.`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("pre", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("code", {
|
|
parentName: "pre",
|
|
"className": "language-yaml"
|
|
}, `apiVersion: resources.cattle.io/v1
|
|
kind: Backup
|
|
metadata:
|
|
name: s3-iam-backup
|
|
spec:
|
|
storageLocation:
|
|
s3:
|
|
bucketName: rancher-backups
|
|
folder: ecm1
|
|
region: us-west-2
|
|
endpoint: s3.us-west-2.amazonaws.com
|
|
resourceSetName: rancher-resource-set
|
|
encryptionConfigSecretName: encryptionconfig
|
|
`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h2", {
|
|
"id": "restore"
|
|
}, `Restore`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `This section contains example Restore custom resources.`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("blockquote", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", {
|
|
parentName: "blockquote"
|
|
}, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("strong", {
|
|
parentName: "p"
|
|
}, `Note:`), ` Refer to the `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/v2.8/reference-guides/backup-restore-configuration/restore-configuration"
|
|
}, `restore config reference page`), ` for more information on configuring the options below.`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h3", {
|
|
"id": "restore-using-the-default-backup-file-location"
|
|
}, `Restore Using the Default Backup File Location`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("pre", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("code", {
|
|
parentName: "pre",
|
|
"className": "language-yaml"
|
|
}, `apiVersion: resources.cattle.io/v1
|
|
kind: Restore
|
|
metadata:
|
|
name: restore-default
|
|
spec:
|
|
backupFilename: default-location-recurring-backup-752ecd87-d958-4d20-8350-072f8d090045-2020-09-26T12-29-54-07-00.tar.gz
|
|
# encryptionConfigSecretName: test-encryptionconfig
|
|
`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h3", {
|
|
"id": "restore-for-rancher-migration"
|
|
}, `Restore for Rancher Migration`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("pre", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("code", {
|
|
parentName: "pre",
|
|
"className": "language-yaml"
|
|
}, `apiVersion: resources.cattle.io/v1
|
|
kind: Restore
|
|
metadata:
|
|
name: restore-migration
|
|
spec:
|
|
backupFilename: backup-b0450532-cee1-4aa1-a881-f5f48a007b1c-2020-09-15T07-27-09Z.tar.gz
|
|
prune: false
|
|
storageLocation:
|
|
s3:
|
|
credentialSecretName: s3-creds
|
|
credentialSecretNamespace: default
|
|
bucketName: rancher-backups
|
|
folder: ecm1
|
|
region: us-west-2
|
|
endpoint: s3.us-west-2.amazonaws.com
|
|
`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h3", {
|
|
"id": "restore-from-encrypted-backup"
|
|
}, `Restore from Encrypted Backup`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("pre", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("code", {
|
|
parentName: "pre",
|
|
"className": "language-yaml"
|
|
}, `apiVersion: resources.cattle.io/v1
|
|
kind: Restore
|
|
metadata:
|
|
name: restore-encrypted
|
|
spec:
|
|
backupFilename: default-test-s3-def-backup-c583d8f2-6daf-4648-8ead-ed826c591471-2020-08-24T20-47-05Z.tar.gz
|
|
encryptionConfigSecretName: encryptionconfig
|
|
`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h3", {
|
|
"id": "restore-an-encrypted-backup-from-minio"
|
|
}, `Restore an Encrypted Backup from Minio`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("pre", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("code", {
|
|
parentName: "pre",
|
|
"className": "language-yaml"
|
|
}, `apiVersion: resources.cattle.io/v1
|
|
kind: Restore
|
|
metadata:
|
|
name: restore-minio
|
|
spec:
|
|
backupFilename: default-minio-backup-demo-aa5c04b7-4dba-4c48-9ac4-ab7916812eaa-2020-08-30T13-18-17-07-00.tar.gz
|
|
storageLocation:
|
|
s3:
|
|
credentialSecretName: minio-creds
|
|
credentialSecretNamespace: default
|
|
bucketName: rancherbackups
|
|
endpoint: minio.xip.io
|
|
endpointCA: <base64-encoded-cert>
|
|
encryptionConfigSecretName: test-encryptionconfig
|
|
`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h3", {
|
|
"id": "restore-from-backup-using-an-aws-credential-secret-to-access-s3"
|
|
}, `Restore from Backup Using an AWS Credential Secret to Access S3`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("pre", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("code", {
|
|
parentName: "pre",
|
|
"className": "language-yaml"
|
|
}, `apiVersion: resources.cattle.io/v1
|
|
kind: Restore
|
|
metadata:
|
|
name: restore-s3-demo
|
|
spec:
|
|
backupFilename: test-s3-recurring-backup-752ecd87-d958-4d20-8350-072f8d090045-2020-09-26T12-49-34-07-00.tar.gz.enc
|
|
storageLocation:
|
|
s3:
|
|
credentialSecretName: s3-creds
|
|
credentialSecretNamespace: default
|
|
bucketName: rancher-backups
|
|
folder: ecm1
|
|
region: us-west-2
|
|
endpoint: s3.us-west-2.amazonaws.com
|
|
encryptionConfigSecretName: test-encryptionconfig
|
|
`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h3", {
|
|
"id": "restore-from-ec2-nodes-with-iam-permissions-to-access-s3"
|
|
}, `Restore from EC2 Nodes with IAM Permissions to Access S3`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `This example shows that the AWS credential secret does not have to be provided to restore from backup if the nodes running `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("inlineCode", {
|
|
parentName: "p"
|
|
}, `rancher-backup`), ` have `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/v2.8/reference-guides/backup-restore-configuration/backup-configuration#iam-permissions-for-ec2-nodes-to-access-s3"
|
|
}, `these permissions for access to S3.`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("pre", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("code", {
|
|
parentName: "pre",
|
|
"className": "language-yaml"
|
|
}, `apiVersion: resources.cattle.io/v1
|
|
kind: Restore
|
|
metadata:
|
|
name: restore-s3-demo
|
|
spec:
|
|
backupFilename: default-test-s3-recurring-backup-84bf8dd8-0ef3-4240-8ad1-fc7ec308e216-2020-08-24T10#52#44-07#00.tar.gz
|
|
storageLocation:
|
|
s3:
|
|
bucketName: rajashree-backup-test
|
|
folder: ecm1
|
|
region: us-west-2
|
|
endpoint: s3.us-west-2.amazonaws.com
|
|
encryptionConfigSecretName: test-encryptionconfig
|
|
`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h2", {
|
|
"id": "example-encryptionconfiguration"
|
|
}, `Example EncryptionConfiguration`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `The snippet below demonstrates two different types of secrets and their relevance with respect to Backup and Restore of custom resources.`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `The first example is that of a secret that is used to encrypt the backup files. The backup operator, in this case, will not be able to read the secrets encryption file. It only uses the contents of the secret.`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `The second example is that of a Kubernetes secrets encryption config file that is used to encrypt secrets when stored in etcd. `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("strong", {
|
|
parentName: "p"
|
|
}, `When backing up the etcd datastore, be sure to also back up the EncryptionConfiguration.`), ` Failure to do so will result in an inability to use the restored data if secrets encryption was in use at the time the data was backed up.`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("pre", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("code", {
|
|
parentName: "pre",
|
|
"className": "language-yaml"
|
|
}, `apiVersion: apiserver.config.k8s.io/v1
|
|
kind: EncryptionConfiguration
|
|
resources:
|
|
- resources:
|
|
- secrets
|
|
providers:
|
|
- aesgcm:
|
|
keys:
|
|
- name: key1
|
|
secret: c2VjcmV0IGlzIHNlY3VyZQ==
|
|
- name: key2
|
|
secret: dGhpcyBpcyBwYXNzd29yZA==
|
|
- aescbc:
|
|
keys:
|
|
- name: key1
|
|
secret: c2VjcmV0IGlzIHNlY3VyZQ==
|
|
- name: key2
|
|
secret: dGhpcyBpcyBwYXNzd29yZA==
|
|
- secretbox:
|
|
keys:
|
|
- name: key1
|
|
secret: YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoxMjM0NTY=
|
|
`)));
|
|
}
|
|
MDXContent.isMDXComponent = true;
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |