2 Managing Backups With File System Snapshots and Data Mirroring

Backing up data is the typical method of preserving a system's file system. If the backup is stored at a location other than the location of the physical system, the backup can then be used to restore a system in the event of failures.

Other strategies to complement backups can be adopted to preserve data. The common methods are taking snapshots of the system and configuring mirroring.

Working With File System Snapshots

You can configure file systems to use Copy-on-Write (CoW) functionality to replicate data between a snapshot and a volume or subvolume. Snapshots are an inexpensive use of disk space and an efficient way to roll back small changes.

Use file system snapshots as part of a broader back up and recovery strategy. Snapshots can not protect against hardware failures, but they can provide a rapid recovery mechanism in the event of a software failure or user error.

You can automate the creation of snapshots with the snapper utility.

Managing Snapshots With Btrfs

On Btrfs, you can create snapshots in any directory within the file system, and the file system itself monitors and maintains the consistency of each snapshot. This monitoring and maintenance makes Btrfs snapshots incredibly reliable and provide significant performance gains over using snapshot functionality provided by the Logical Volume Manager (LVM).

The snapper utility that's provided on Oracle Linux for creating and managing file system snapshots simplifies and automates regular timed snapshots. Thus, rolling the system back to a particular time becomes easier. The utility also comes with a plugin for yum or dnf so that you can automatically generate a snapshot immediately before and immediately after any software updates, installations, or removal. Snapshots that are tied to software changes simplify any recovery from inadvertent configuration changes, conflicts, incompatibilities, and other similar disaster scenarios.

For more information about managing Btrfs formatted volumes, see Oracle Linux 8: Managing Local File Systems and Oracle Linux 9: Managing Local File Systems.

Managing Snapshots With LVM

Logical Volume Manager (LVM) provides volume abstraction for the OS so that logical volumes can span multiple disks. Therefore, LVM maintains continuity of service while hard-drive replacement, partition resizing, or volume backup are being performed. With LVM, you can create snapshots of entire volumes.

When you create snapshots with LVM, the underlying file system is unaware of snapshots you have created, because the snapshot is created at the volume level. LVM snapshots maintain a mirror of the logical volume at a specific point in time, but file system consistency isn't always guaranteed. You must mount the snapshot volume after it's created if you need access to it from within the OS.

Although LVM snapshots only track changes to the volume and are therefore efficient in terms of storage space, the implementation of Copy-on-Write can impact general system performance negatively when snapshots remain in place because the snapshot effectively tracks and stores metadata for every change happening on the original volume. For this reason, you need to plan a strategy for snapshot volumes beforehand to ensure that they have enough space to track these changes. As best practice, perform regular clean up of the snapshots after you're finished using them. LVM snapshots are primarily designed to provide a static and unchanging image of a volume at a point in time to facilitate stable backup, but can also be used to rollback changes during planned maintenance windows.

For more information about managing storage with LVM, see Oracle Linux 8: Managing Storage Devices and Oracle Linux 9: Managing Storage Devices.

Working With Data Mirroring

You can ensure resilience against data loss and hardware failures by replicating data in multiple places. By mirroring data in real time, you can also preserve the accuracy and integrity of that data when you perform a disaster recovery operation.

Managing Geo-Replicated Data With Gluster Storage for Oracle Linux

Gluster Storage for Oracle Linux is distributed and replicated storage that provides durability by virtue of its ability to replicate data across multiple systems synchronously.

Further, this service provides the ability to asynchronously mirror data across different geographically located systems through its geo-replication features. Gluster Storage for Oracle Linux can help the enterprise recover in the case of full data center failure.

For more information about how to mirror data across locations for disaster recovery purposes by using geo-replication, see Oracle Linux: Gluster Storage for Oracle Linux User's Guide.

Managing Data Mirroring Hosted on Oracle Cloud Infrastructure

Block volumes that are hosted on Oracle Cloud Infrastructure have built in data resilience and durability. All volumes are automatically replicated and stored redundantly across several storage servers with built-in repair mechanisms. For more information, see Overview of Block Volumes.

On some compute instances on Oracle Cloud Infrastructure, you can use locally attached NVMe devices for low latency and high performance block storage. In the case where you have locally attached NVMe devices, this storage isn't protected with the same data resilience and durability for general block storage provided on Oracle Cloud Infrastructure. To mitigate against hardware failure, consider setting up software RAID to mirror data across multiple devices. For more information see Protecting Data on NVMe Devices. For more general information about configuring RAID on Oracle Linux systems, see Oracle Linux 8: Managing Storage Devices and Oracle Linux 9: Managing Storage Devices.

Managing Block Device Redundancy With Software RAID

To replicate data across volumes, you can configure Oracle Linux to use Software RAID in a RAID-1 "mirror" configuration. RAID-1 is most useful for localized disaster recovery when used with file system or volume snapshot functionality. RAID-1 is less flexible and resilient than geo-replication and the mirroring that's provided by Oracle Cloud Infrastructure. However, RAID-1 provides an immediate on site service that can reduce downtime in case of disk failure.

For more information about configuring RAID, see Oracle Linux 8: Managing Storage Devices and Oracle Linux 9: Managing Storage Devices.