The following glusterfs-storage StorageClass has custom volume naming enabled by adding th e volumenameprefix parameter. The goal of this blog post is to provide a generic method to back up and restore OCS persistent volumes used with OCP workloads. The example scripts and. As such, they can be used with a product such as Commvault, where the scripts can be embedded in the backup configuration.
Note: The methods described here apply only for gluster-file volumes and currently will not work for gluster-block volumes.
For this approach, a "bastion host" is needed for executing the scripts, mounting GlusterFS snapshot volumes, and providing a place to install the agent if using backup and restore software. The following must be installed or downloaded to the bastion host:. The github repository rhocs-backup contains unsupported example code that can be used with backup and restore software products. The two scripts, rhocs-pre-backup. The rhocs-pre-backup. Once the mounted snapshot volumes have been backed up, the rhocs-post-backup.
The two. The pre-backup script, when executed, uses the heketi-client for the list of current gluster-file volumes. Because of this, for the script to work properly the heketi container must be online and reachable from bastion host.
This section assumes that the bastion host has been created and has the necessary packages, scripts, and. Currently, the pre- and post-backup scripts run as the root user. This access should be verified before attempting to run the following scripts. A variation of these scripts for RHOCS independent mode can be manually executed in the following manner:. For each execution of the pre- or post-backup script a log file will be generated and placed in the directory specified in the.
Note: Pre-backup scripts can be modified as needed for specific scenarios to achieve application-level consistency, like quiescing a database before taking a backup. Also, if special features are used with RHOCS, like SSL encryption or geo-replication, scripts will have to be customized and adjusted to be compatible with those features.
Note that this blog post does not cover the tasks to install and configure Commvault to back up and restore data. In addition to having the Commvault Console and Agent in working order, this section also assumes that the bastion host has been created and has the necessary packages, scripts, and.
The use of these scripts to back up OCP PVs is compatible with any backup frequency or retention configured in the Commvault backup policy. But, as we are mounting gluster snapshots in newly created folders with date and time information, the backup application will always consider contents as new, so even if backup policy is incremental, it will effectively do a full backup.
Also, the backup content will consist of dozens or even hundreds of very small filesystems GB , that could run faster under a "always do full backup" strategy. Once the scripts and. The following views show how to do the backup using the Commcell Console and validate the backup using the Admin Console. A Subclient must be created before a backup can be done and a unique name must be specified.
When creating a Subclient, you must input where on the bastion host you want the backup to be done from on the bastion host with Commvault Agent e. Choose what schedule you want the backup done on or Do Not Schedule; start backup manually using Console instead.
And last or the Subclient configuration, add the path to the pre- and post-backup scripts, as well as the path to the appropriate. Once this is done and the subclient has been saved, you are ready to take a backup of the gluster-file snapshot volumes. The backup can then be done by selecting the desired subclient and issuing an immediate backup or letting the selected schedule do the backups when configured e.
For an immediate backup, you can choose full or incremental. As already stated, a full backup will be done every time, because the pre-backup script always creates a new directory to mount the gluster-file snapshot volume. To make the backups incremental, meaning that only the changed files are backed up on each run, add this line:. To ensure that a full backup is done regularly in addition to incremental backups, add this line:. ReaR can also include both the rescue system and the backup in the ISO image.
This is the simplest method of full-system backup, because the rescue system does not need the user to fetch the backup during recovery.
However, it needs more storage. Also, single-ISO backups cannot be incremental. To use rsync instead of tar , add this line:. Note that incremental backups are only supported when using tar.
To create a rescue system only , run:. To create a rescue system and a backup , run:. ReaR cannot trigger other backup methods. Consequently, Red Hat Enterprise Linux is not capable of performing a tape boot when running on such hardware.
The tar utility is well known among UNIX system administrators. It is the archiving method of choice for sharing ad-hoc bits of source code and files between systems. Using tar , backing up the contents of a directory can be as simple as issuing a command similar to the following:. This command creates an archive file called home-backup.
0コメント