Previous  |  Next  >  
Product: File System Guides   
Manual: File System 4.1 Administrator's Guide   

Backing Up and Restoring a File System

To back up a VxFS file system, you first create a read-only snapshot file system, then back up the snapshot. This procedure lets you keep the main file system on line. The snapshot is a copy of the snapped file system that is frozen at the moment the snapshot is created.

See Online Backup Using File System Snapshots and the following manual pages for more information about the mount, vxdump, and vxrestore commands and their available options:

    • mount(1M)
    • mount_vxfs(1M)
    • vxdump(1M)
    • vxrestore(1M)

How to Create and Mount a Snapshot File System

The first step in backing up a VxFS file system is to create and mount a snapshot file system. To create and mount a snapshot of a VxFS file system, use the syntax:


mount [-F vxfs] -o snapof=source,[snapsize=size] \
destination snap_mount_point

source

The special device name or mount point of the file system to copy.

destination

The name of the special device on which to create the snapshot.

size

The size of the snapshot file system in sectors.

snap_mount_point

Location where to mount the snapshot; snap_mount_point must exist before you enter this command.


Example

To create a snapshot file system of the file system at /home on /dev/vx/dsk/fsvol/vol1 and mount it at /snapmount, enter:


# mount -F vxfs -o snapof=/home, \
  snapsize=32768 /dev/vx/dsk/fsvol/vol1 /snapmount

You can now back up the file system, as described in the following section.

How to Back Up a File System

After creating a snapshot file system as described in the previous section, you can use vxdump to back it up. To back up a VxFS snapshot file system, use the syntax:


 vxdump [-c] [-f backupdevsnap_mount_point

-c

Specifies using a cartridge tape device.

backupdev

The device on which to back up the file system.

snap_mount_point

The snapshot file system's mount point.


Example

To back up the VxFS snapshot file system mounted at /snapmount to the tape drive with device name /dev/rmt, enter:


 # vxdump -cf /dev/rmt /snapmount

How to Restore a File System

After backing up the file system, you can restore it using the vxrestore command. First, create and mount an empty file system. To restore a VxFS snapshot file system, use the syntax:


 vxrestore [-v] [-x] [filename]

-v

Specifies verbose mode.

-x

Extracts the named files from the tape.

filename

The file or directory to restore. If filename is omitted, the root directory (and thus the entire tape) is extracted.


Example

To restore a VxFS snapshot file system from the tape /dev/st1 into the mount point /restore, enter:


# cd /restore
# vxrestore -v -x -f /dev/st1
 ^ Return to Top Previous  |  Next  >  
Product: File System Guides  
Manual: File System 4.1 Administrator's Guide  
VERITAS Software Corporation
www.veritas.com