Sun Microsystems Logo
Products & Services
 
Support & Training
 
 

Previous Previous     Contents     Index     Next Next
Chapter 47

Backing Up Files and File Systems (Tasks)

This chapter describes the procedures for backing up file systems by using the ufsdump command.

For information on these procedures, see Backing Up Files and File System (Task Map).

For overview information about performing backups, see Chapter 46, Backing Up and Restoring File Systems (Overview).

For detailed information on the ufsdump command syntax, options, and arguments, see Chapter 50, UFS Backup and Restore Commands (Reference).

Backing Up Files and File System (Task Map)

Task

Description

For Instructions

1. Prepare for file system backups

Identify the file systems, the type of backup, and the tape device to be used for the backups.

Preparing for File System Backups 

2. Determine the number of tapes needed to back up a file system

Determine the number of tapes that are needed for a full backup of a file system.

How to Determine the Number of Tapes Needed for a Full Backup 

3. Back up file systems

Perform a full backup of file systems to get baseline copies of all files.

Perform an incremental backup of file systems based on whether keeping copies of files that have changed on a daily basis is important at your site.

How to Backup a File System to Tape 

Preparing for File System Backups

The preparation for backing up file systems begins with planning, which is described in Chapter 46, Backing Up and Restoring File Systems (Overview) and includes choosing the following:

  • The file systems to back up

  • The type of backup (full or incremental) to perform

  • A backup schedule

  • A tape drive

For more information, see Chapter 46, Backing Up and Restoring File Systems (Overview).

This section describes two other tasks you might need to perform before you back up file systems:

  • Finding the names of file systems to back up

  • Determining the number of tapes that are needed for a full backup

ProcedureHow to Find File System Names

  1. Display the contents of the /etc/vfstab file.

    $ more /etc/vfstab

  2. Look in the mount point column for the name of the file system.

  3. Use the directory name listed in the mount point column when you back up the file system.

Example--Finding File System Names

In this example, the file systems to be backed up are root (/), /usr, /datab, and /export/home.

$ more /etc/vfstab
#device           device             mount        FS   fsck mount   mount
#to mount         to fsck            point        type pass at boot options
#
fd                -                  /dev/fd      fd    -    no      -
/proc             -                  /proc        proc  -    no      -
/dev/dsk/c0t0d0s1 -                  -            swap  -    no      -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 /            ufs   1    no      -
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /usr         ufs   1    no      -
/dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /datab       ufs   2    yes     -
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs   2    yes     -
swap              -                  /tmp         tmpfs -    yes     -

ProcedureHow to Determine the Number of Tapes Needed for a Full Backup

  1. Become superuser or assume an equivalent role.

  2. Estimate the size of the backup in bytes.

    # ufsdump S file-system

    The S option displays the estimated number of bytes that are needed to do the backup.

  3. Divide the estimated size by the capacity of the tape to see how many tapes you need.

    For a list of tape capacities, see Table 46-5.

Example--Determining Number of Tapes

In this example, the file system of 489,472 bytes easily fits on a 150-Mbyte tape.

# ufsdump S /export/home
489472

Backing Up a File System

The following are general guidelines for performing backups:

  • Use single-user mode or unmount the file system, unless you are creating a snapshot of a file system. For information about UFS snapshots, see Chapter 48, Using UFS Snapshots (Tasks).

  • Be aware that backing up file systems when directory-level operations (such as creating, removing, and renaming files) and file-level activity are occurring simultaneously means that some data will not be included in the backup.

  • You can run the ufsdump command from a single system and remotely back up groups of systems across the network through remote shell or remote login. In addition, you can direct the output to the system on which the tape device is located. Typically, the tape device is located on the system from which you run the ufsdump command, but it does not have to be.

    Another way to back up files to a remote device is to pipe the output from the ufsdump command to the dd command. For information about using the dd command, see Chapter 51, Copying UFS Files and File Systems (Tasks).

  • If you are doing remote backups across the network, the system with the tape device must have entries in its /.rhosts file for each client that will be using the drive. Also, the system that initiates the backup must be included in the /.rhosts file on each system that it will back up.

  • To specify a remote tape device on a system, use the naming convention that matches the OS release of the system with the remote tape device. For example, use the /dev/rst0 device for a remote device on a system that is running the SunOS 4.1.1 release or compatible versions. Use the /dev/rmt/0 device for a system running the Solaris 9 release or compatible versions.


Note - Use the nisbackup command to back up an NIS+ master server. For information on using this command, see System Administration Guide: Naming and Directory Services (FNS and NIS+).


Previous Previous     Contents     Index     Next Next