Info: LVM snapshots capture the filesystem state at creation time. They use copy-on-write storage, recording changed blocks after the snapshot is created. A snapshot can later be merged to roll back changes.
$ sudo lvremove /dev/vg0/snap1 # Discard snapshot without merging
$ sudo btrfs subvolume snapshot /home /home.snap # Btrfs alternative
Note: Requires LVM or Btrfs. Copy-on-write introduces a slight write penalty. Ensure the snapshot has enough space for changed blocks, or it can become invalid. Merging a root filesystem snapshot may require a reboot depending on how the root volume is mounted. Perfect before major upgrades.
John Britto Founder & Chief-Editor @LinuxTeck. A Computer Geek and Linux Intellectual having more than 20+ years of experience in Linux and Open Source technologies.
Leave a Reply