Linux operating systems
IBM Tivoli Storage Manager, Version 7.1

Backing up and restoring Btrfs file systems

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

If you used a version of the Tivoli® Storage Manager backup-archive client that is older than V7.1 to back up a Btrfs file system, the file system type was listed as Unknown, in the Tivoli Storage Manager server GUI and command output. The Unknown file system type is displayed because before Tivoli Storage Manager 7.1, Btrfs file systems were not formally supported. If you use a Tivoli Storage Manager backup-archive V7.1 client (or newer) to back up that same Btrfs file system, all files that have Access Control Lists (ACLs) and extended attributes (XATTRs) are backed up again, even if their content has not changed since the last backup that was created by the older version of the client. Also, after a Btrfs file system is backed up by the V7.1 (or newer) client, the file system type is correctly shown as Btrfs in the Tivoli Storage Manager GUI and command output.

Even with a V7.1 or newer client, copying a file on a Btrfs file system might cause the file to be included in the next backup operation. For example, if you copy a file by using the cp command with the -p or -preserve options (preserve mode, ownership, and time stamps), and if the file’s attributes are changed, the access ACL extended attribute (system.posix_acl_access) is changed. Because an extended attribute is changed, the Tivoli Storage Manager client backs up the entire file, rather than just updating the attributes for the file.

  1. Mount the file system that you want to protect or recover. For example, use the following syntax to mount a file system: mount /dev/sdb1 on /btreefs1 type btrfs (rw)
  2. Protect or recover the file system by performing one of the following operations:
    Operation Command
    Back up the file system
    dsmc incr /btreefs1
    Restore the file system
    dsmc restore /btreefs1/  
       -subdir=yes -replace=yes
    Archive the file system
    dsmc archive /btreefs1/ 
      -subdir=yes
    Retrieve the file system
    dsmc retrieve /btreefs1/
       -subdir=yes -replace=yes
    Back up a file system snapshot Create the file system snapshot. Use the btrfs subvolume snapshot command. The snapshot directory that is specified in this example is the btreefs1_snap directory on the file system named /btreefs1.
     btrfs subvolume snapshot /btreefs1/
       /btreefs1/btreefs1_snap
    Issue the backup-archive client incremental command. Specify the snapshotroot option and the location of the Btrfs snapshot.
     $DSM_DIR/dsmc incr /btreefs1
       -snapshotroot=/btreefs1/btreefs1_snap
    Perform an image backup
    All subvolumes must be unmounted before you create an image backup.
    dsmc backup image /btreefs1 
       -snapshotproviderimage=none
    To avoid having to unmount the subvolumes, create a snapshot-based image backup.
    dsmc backup image /btreefs1
    Restore an image backup
    All subvolumes must be unmounted before you restore an image backup.
    dsmc restore image /btreefs1


Feedback