Linux operating systems
IBM Tivoli Storage Manager, Version 7.1

Backing up and restoring Btrfs subvolumes

You can back up or restore, or archive and retrieve, Btrfs subvolumes by using the backup-archive client incremental, selective, restore, archive, and retrieve commands.

  1. List the subvolumes and determine their IDs.
    btrfs subvolume list /btreefs1
     ID 256 top level 5 path @
     ID 262 top level 5 path @/btreefs1_sub1
  2. Make the directory to use as the mount point for the subvolume.
     mkdir /btreefs1_sub1 
  3. Mount the subvolume. For example, to mount the subvolume on device sdb1 at /btreefs1_sub1, use the following syntax: mount -t btrfs -o subvolid=262 /dev/sdb1 /btreefs1_sub1

    Protect or recover the subvolume by using one or more of the following operations:

    Operation Command
    Back up a subvolume Both incremental and selective backups are supported.
    dsmc incr /btreefs1_sub1
    dsmc sel /btreefs1_sub1/ -subdir=yes
    Restore a subvolume
    dsmc restore /btreefs1_sub1/ 
       -subdir=yes -replace=yes
    Archive a subvolume
    dsmc archive /btreefs1_sub1/ 
      -subdir=yes
    Retrieve a subvolume
    dsmc retrieve /btreefs1_sub1/ 
       -subdir=yes -replace=yes
    Back up a Btrfs subvolume snapshot Create the subvolume snapshot. Use the btrfs subvolume snapshot command. The snapshot directory that is specified in this example is the /btreefs1/btreefs1_sub1_snap directory, for the subvolume named btreefs1_sub1.
     btrfs subvolume snapshot 
      /btreefs1/btreefs1_sub1   
      /btreefs1/btreefs1_sub1_snap
    Issue the backup-archive client incremental command. Specify the snapshot root option and the location of the Btrfs snapshot.
     dsmc incr /btreefs1_sub1 
       -snapshotroot=/btreefs1
        /btreefs1_sub1_snap


Feedback