import InstallVelero from "../partials/snapshots/_installVelero.mdx" import RegistryCredNote from "../partials/snapshots/_registryCredentialsNote.mdx" import ResticDaemonSet from "../partials/snapshots/_resticDaemonSet.mdx" import UpdateDefaultStorage from "../partials/snapshots/_updateDefaultStorage.mdx" import CheckVersion from "../partials/snapshots/_checkVersion.mdx"
This topic describes how to install Velero and configure a host path as your storage destination for backups.
:::note :::
-
The host path must be a dedicated directory. Do not use a partition used by a service like Docker or Kubernetes for ephemeral storage.
-
The host path must exist and be writable by the user:group 1001:1001 on all nodes in the cluster. For example, in a Linux environment you might run
sudo chown -R 1001:1001 /backups
to change the user:group permissions.If you use a mounted directory for the storage destination, such as one that is created with the Common Internet File System (CIFS) or Server Message Block (SMB) protocols, ensure that you configure the user:group 1001:1001 permissions on all nodes in the cluster and from the server side as well.
You cannot change the permissions of a mounted network shared filesystem from the client side. To reassign the user:group to 1001:1001 for a directory that is already mounted, you must remount the directory. For example, for a CIFS mounted directory, specify the
uid=1001,gid=1001
mount options in the CIFS mount command.
Complete the following items before you perform this task:
- Review the limitations and considerations. See Limitations and Considerations in About Backup and Restore.
- Install the velero CLI. See Installing the Velero CLI.
To install Velero and configure host path storage in online environments:
-
Run the following command to configure the host path storage destination:
kubectl kots velero configure-hostpath --namespace NAME --hostpath /PATH
Replace:
NAME
with the namespace where the Replicated KOTS Admin Console is installed and runningPATH
with the path to the directory where the backups will be stored
For more information about required storage destination flags, see
velero
in Reference.
To install Velero and configure host path storage in air gapped environments:
-
Run the following command to configure the host path storage destination:
kubectl kots velero configure-hostpath \ --namespace NAME \ --hostpath /PATH \ --kotsadm-registry REGISTRY_HOSTNAME[/REGISTRY_NAMESPACE] \ --registry-username REGISTRY_USERNAME \ --registry-password REGISTRY_PASSWORD
Replace:
NAME
with the namespace where the Admin Console is installed and runningPATH
with the path to the directory where the backups will be storedREGISTRY_HOSTNAME
with the registry endpoint where the images are hostedREGISTRY_NAMESPACE
with the registry namespace where the images are hosted (Optional)REGISTRY_USERNAME
with the username to use to authenticate with the registryREGISTRY_PASSWORD
with the password to use to authenticate with the registry
For more information about required storage destination flags, see
velero
in Reference.
Alternatively, when the Admin Console and application are already installed, you can start in the Admin Console to install Velero and configure a host path storage destination.
To install Velero and configure host path storage for existing clusters:
-
From the Admin Console, click Snapshots > Settings and Schedule.
-
Click Add a new storage destination.
The Add a new destination dialog opens and shows instructions for setting up Velero with different providers.
-
Click Host Path.
-
In the Configure Host Path dialog, enter the path to the directory where the backups will be stored. Click Get instructions.
A dialog opens with instructions on how to set up Velero with the specified host path configuration.
-
Follow the steps in the dialog to install Velero and configure the storage destination.
-
Return to the Admin Console and either click Check for Velero or refresh the page to verify that the Velero installation is detected.
- (Existing Clusters Only) Configure Velero namespace access if you are using minimal RBAC. See Configuring Namespace Access and Memory Limit.
- (Optional) Increase the default memory limits. See Configuring Namespace Access and Memory Limit.
- Create or schedule backups. See Creating and Scheduling Backups.