(1) Data equipment name
Tape
Types of
Equipment name
capacity
Machine type
8mm
D8112
5G
8205
8mm
D8160
7g
8505-8705
8mm
D8170
20g
8900
4mm
DDS1 (60M)
1.3G
4mm
DDS2 (120M)
7g
4mm
DDS3 (125M)
12g
Equipment name: / dev / rmt / 0, / dev / rmt / 0n (without riding)
2. Floppy disk
Equipment name: / dev / fd0
3. File
(2) Data backup command
Solaris 2.x computing environment provides several commands for backup and recovery files and file systems.
Multi-volume backup
connection
System bridge
UFSDUMP
UFSRESTORE
YES
NO
NO
Tar
NO
YES
YES
CPIO
YES
YES
YES
1.ufsdump command
For system administrators, ufsdump commands are useful to make complete or incremental dumps for the entire file system.
The complete dump is a backup of the entire file system. Do it at a longer interval, such as a week or in January.
Incremental dumps are backups for newly created or modified files. The incremental dump is more frequent, possibly one day.
The ufsdump command provides a different level of dump, from 0 to 9. Dump level to determine which file backups .0 designated
Complete dump, 1 to 9 specify different levels of incremental dumps. For example, incremental dump (level 1) will be on the previous low level
(Grade 0) After the dump, the file is modified or created. When the file system is backed up, the system should be transferred to the run level S.
If the system is running at runtime 3, the file may be in use, so it may cause an invalid backup.
example:
# ufsdump 0uf / dev / rmt / 0 / export / home
Options and parameters:
0
Specify a grade 0 (complete) dump.
U
Update file / etc / dumpdates to record successful dumps.
fly
Determine the dump tape device with the following / DEV / RMT / 0 parameters.
/ DEV / RMT / 0
Turning tape devices.
/ export / home
Specifies the file system to be dicted.
2.ufsrestore command
UFSRESTORE commands are copied from the backup tape to the current directory.
UFSRESTORE commands can be used to overload a single or multiple files on the entire file system or backup tape.
The option for the ufsrestore command is used to specify the path name of the tape device name and the recovered file.
Recovery process
Use the UFSRESTORE command to restore a file by following these steps:
# cd / newdir
# ufsrestore tuf / dev / rmt / 0
3.tar command
The tar command is a user-level backup command for backup and recovery files or directories.
Command format: tar options Tape_Device_name [filename]
Option C- Create a new document V-display path
T-display file list f-designated device
X-extraction file i-interactive
example:
(1) Backup process:
$ TAR CVF / DEV / RMT / 0 *
(2) Recovery process:
$ TAR XVF / DEV / RMT / 0
(3) Directory copy
$ TAR CVF - MyDir | (CD Newdir; TAR XVF -)
(4) Copy (must be trusted users)
$ TAR CVF - MYDIR | RSH Remote Tar XVF -
4.cpio command
The CPIO (Copy IN / OUT) command is a user-level command that produces a multi-volume backup.
Command format:
CPIO -OV> TAPE_DEVICE_NAME
CPIO -I [VT] Once it identifies the tail of the medium, it prompts you to insert another tape. CPIO command uses the output of the LS or FIND command to output these files to a file, Such as tape devices. It is inserted between files into the title for easy recovery, so slower than the tar command. The CPIO command can be used as a parameter with a wildcard, however, the CPIO is in anti-induced harness, which in addition to the matching condition. Outside the file, it will back up all files. Backup process $ FIND. -Depth -Print | CPIO -OV> / DEV / RMT / 0 The Find command provides a list of files and directory names to the cpio command. The -o option represents a read from the standard output. / DEV / RMT / 0 parameter determines the tape device. example: Back up the primary directory to the tape with the FIND and CPIO commands: Recovery process Use the CPIO command to retrieve files and directories from the tape by following these steps. 1. Insert the tape into the tape device. 2. Change the directory to / TMP directory. 3. Determine the path name of the file to be recovered with the following CPIO directory. $ CPIO -IV dev / rmt / 0 -i option extracts files, V (verbose) options are used to list files by LS -L format with T option. Use this composite option to display only file information without extracting files. 4. Restore the file to / tmp directory with the following cpio command. $ CPIO -IV Option I extract files, V represents the file name when recovery. 5. Copy the file from the directory / TMP copy to the desired directory. 6. Remove the tape. The following example shows how to recover a file with a cpio command. 5.compress, uncompress, zcat command Compress commands use a special format to compress files to reduce file size. Compression ratio from 20% to 80%. For example, compressing files named bin.file with the -v option: This file is compressed, plus the suffix.z. Zcat 6.mt command MT -F / DEV / RMT / 0 STATUS Reporting device status MT -F / DEV / RMT / 0 REW MT -F / DEV / RMT / 0N FSF 1 MT -F / DEV / RMT / 0N BSF 3 7.dd command DD if = / dev / rmt / 0 of = / tmp / file bs = 1024 8. Using a tape drive from all place (must be trusted user) (1) Backup data to a different tape drive TAR CVF - DIRNAME | RSH Remote DD of = / DEV / RMT / 0 (2) Read data from off-site tape drive RSH Remote DD IF = / dev / rmt / 0 tar xvf -