Sun Microsystems Logo
Products & Services
 
Support & Training
 
 

On#Sun.com Magazine 2001 Apr-May
Hot tips
»   A letter from Jim Hassell
»   Sun launches "Midframe" server
»   Fiscal solutions
»   Server appliance
»   Calling Ardec
»   X1, E1, T1
Hot tips
»   Insurance pays
»   A 3D world
»   Sun ONE
»   Developers' page
»   Honing your skills
»   Sun spot
»   On#Sun.com Competition
 
 

Backing up with ufsdump

The ufsdump/ufsrestore commands are probably the most commonly used filesystem back-up and restore utilities provided with the Solaris Operating Environment. ufsdump provides an efficient mechanism to back-up entire filesystems, or to back-up all files changed since the last full back-up.

You should not use ufsdump on a mounted filesystem. As documented in the ufsdump(1m) manual page, to avoid corrupted back-ups unmount the filesystem:

# umount /myfs
# ufsdump 0uf /dev/rmt/0 /myfs
# mount /myfs

The ufsdump speed and efficiency comes from reading directly from the raw disk device (i.e. /dev/rdsk/c0t0d0s0). This means the filesystem must be inactive, unlike tar and cpio which read through the filesystem layer. Using ufsdump on a read-write mounted filesystem may result in an inconsistent back-up that can not be used to restore from.

The Solaris 8 1/01 release includes the new fssnap command for backing up file systems while the file system is mounted. You can use the fssnap command to create a read-only snapshot of a filesystem, which creates a virtual device and a backing-store file. You can back up the virtual device, which looks and acts like a real device, with any of the existing Solaris back-up commands.

UFS snapshots enable you to keep the file system mounted and the system inmulti-user mode during back-ups. The ufsdump command can be used on the snap virtual device, which presents a read-only, quiescent filesystem.

# fssnap -F ufs -o bs=/file-system/
backing-store-file -o unlink /usr
/dev/fssnap/1
# ufsdump 0uf /dev/rmt/0 /dev/rfssnap/1
# fssnap -d /usr

More information
The ufsdump command is well documented in the ufsdump(1m) manual page. To read more about UFS snapshots and other new features of Solaris 8 1/01 check the update collection at http://docs.sun.com:80/ab2/coll.709.2

Back to Top