Oracle designed the Btrfs file system to meet the expanding scalability requirements of large storage subsystems and efficiently access and update large blocks of data. Btrfs provides crucial features such as checksum functionality for data integrity, integrated multi-device support for block device consolidation with data redundancy, transparent compression to save disk space, and transparent defragmentation to enhance system performance. With its comprehensive capabilities, Btrfs makes an effective solution for a reliable backup and restore process. On Oracle Linux, Btrfs is among the supported local file system types and requires the Unbreakable Enterprise Kernel (UEK), Oracle’s optimized Linux kernel.
Leverage Btrfs for root level snapshots on Oracle Linux
Using Btrfs as the root file system in Oracle Linux provides additional options beyond traditional backup and restore techniques, including creating Btrfs snapshots and using Snapper to automate, manage, and recover snapshots.
A read-only snapshot of a Btrfs file system records the state of the original file system, creating a stable image from which you can perform a backup. Alternatively, you can make a snapshot writable, which you can treat as an alternate version of the original file system. Because of the copy-on-write functionality of Btrfs, copy operations are nearly instantaneous, allowing quick creation of snapshots that consume minimal disk space. Moreover, when rolling back a file system by mounting a snapshot, you can take snapshots of the snapshot itself to record its state.
Beyond manually managing Btrfs snapshots, you can use the Snapper utility to create and delete snapshots, compare differences between snapshots, and revert changes at the file level. In addition, each Snapper configuration contains settings for a periodic backup, including a systemd timer for triggering automatic snapshots. By default, the Snapper configuration keeps ten hourly, ten daily, ten monthly, and ten yearly snapshots before performing a cleanup.
Learn how to backup and restore to recover from a system failure
By taking advantage of our detailed tutorial, you can learn how to perform a backup and restore using Btrfs snapshots and Snapper, preparing you to recover from most system failures. This tutorial demonstrates how to create a snapshot with Btrfs, install and configure Snapper, use Snapper to manage snapshots, roll back system changes, and more.
Resources
- Oracle Linux
- Managing the Btrfs File System (Documentation)
- Get Started With the Btrfs File System on Oracle Linux (Tutorial)
- Use Btrfs for Root Level Snapshots on Oracle Linux (Tutorial)
- Use Btrfs Send and Receive to Create a Secure Remote Backup Facility (Tutorial)
- Oracle Linux Documentation and Training