Creating a Reference Backup in Preparation for Creating an Incremental Backup

The following procedure describes how to create a reference backup, which is a prerequisite to setting up an incremental backup and restore process for a subvolume by using the send/receive feature.

  1. Create a read-only snapshot of the subvolume to serve as an initial reference point for the backup.
    sudo btrfs subvolume snapshot -r /vol /vol/backup_0
  2. Ensure that the snapshot has been written to disk by running the sync command.
    sudo sync
  3. Create a subvolume or directory on a Btrfs file system as a backup area to receive the snapshot, for example, /backupvol.
  4. Send the snapshot to /backupvol.
    sudo btrfs send /vol/backup_0 | btrfs receive /backupvol

    The previous command creates the /backupvol/backup_0 subvolume.

    After creating the reference backup, you can then create incremental backups, as needed. See Creating an Incremental Backup.