The software described in this documentation is either in Extended Support or Sustaining Support. See https://www.oracle.com/us/support/library/enterprise-linux-support-policies-069172.pdf for more information.
Oracle recommends that you upgrade the software described by this documentation as soon as possible.
The following procedure is a suggestion for setting up an incremental backup and restore process for a subvolume.
Create a read-only snapshot of the subvolume to serve as an initial reference point for the backup:
#
btrfs subvolume snapshot -r /
vol
/vol
/backup_0Run sync to ensure that the snapshot has been written to disk:
#
sync
Create a subvolume or directory on a btrfs file system as a backup area to receive the snapshot, for example,
/backupvol
.Send the snapshot to
/backupvol
:#
btrfs send /
vol
/backup_0 | btrfs receive /backupvolThis command creates the subvolume
/backupvol/backup_0
.Having created the reference backup, you can then create incremental backups as required.
To create an incremental backup:
Create a new snapshot of the subvolume:
#
btrfs subvolume snapshot -r /vol /vol/backup_1
Run sync to ensure that the snapshot has been written to disk:
#
sync
Send only the differences between the reference backup and the new backup to the backup area:
#
btrfs send -p /
vol
/backup_0 /vol/backup_1 | btrfs receive /backupvolThis command creates the subvolume
/backupvol/backup_1
.