Solaris 10 Exam - Chapter 7 - System Backups and Restores

¡Supera tus tareas y exámenes ahora con Quizwiz!

What is the restoresymtable file used for

Used only by ufsrestore for "checkpointing" when information is passed between incremental restorations. Not required after the file system has been successfully restored.

CPIO command used to copy the files located on a tape back into a directory named /work on a hard disk

cd /work cpio -icvdV < /dev/rmt/0

CPIO command used to copy the directory /work and its subdirectories to a tape drive with the device name /dev/rmt/0

cd /work find . | cpio -ocB > /dev/rmt/0

Utility used to copy data from one location to another. Can backup and restore individual files, not just whole file systems. Backups made are slightly smaller than those created with tar because the header is smaller. Can span multiple tapes. Three modes: copy out, copy in, copy pass.

cpio (copy input to output) cpio <mode> <option> mode -i copy in mode -o copy out mode -p pass mode option -c writes header information in ASCII -d creates directories as needed -B specifies that input has a blocking facotor of 5,120 bytes -v verbose -u copies unconditionally -m retains the previous file modification time -P preserve ACLs

Which utilities allow for the backing up of files to more then one tape?

cpio, pax, ufsdump

Utility used to convert and copy a file or raw device.

dd dd if=<input-file> of=<output-file> <option=value> -if designate an input file -of designate an output file

DD command used to read tar data coming from another UNIX system

dd if=/dev/rmt/0 conv=swab | tar xvf -

DD command that can be used to duplicate tapes

dd if=/dev/rmt/0 of=/dev/rmt/1

Flash archive command used to get information about archives you have already created

flar -i /data/vararchive

Utility that combines the use of Jumpstart and backup utilities to provide an easy mechanism for restoring a system to its initial state or cloning systems.

flarcreate flarcreate -n <name> <options> <path>/<filename> <name> specifies the name that you give the archive <path> specifies the path to the directory in which you want to save the archive file. <filename> specifies the name of the archive file.

Flash archive command used to create an archive of the entire operating system

flarcreate -n osarchive -t /dev/rmt/0

UFS snapshot command to remove a snapshot

fssnap -d /export/home

Utility that leverages the portability and flexibility of Java to provide capabilities similar to those of tar, cpio, and zip.

jar

Utility used to package and compress archive files. This utility creates compressed archives that are portable across various platforms, including UNIX, VMS, and Windows

zip

UFS snapshot command to specify that the backing-store file be unlinked, which means that the backing-store file is removed after the snapshot is deleted

# fssnap -F ufs -o unlink,backing-store=/var/tmp /export/home

UFS command used to create or clone a new file system from an existing file system

# mkdir /data_new # ufsdump 0ucf - /dev/rfssnap/0 | (cd /data_new; ufsrestore rf - )

Command used to create an incremental backup of a snapshot

# ufsdump 1ufN /dev/rmt/0 /dev/rdsk/c1tod0s0 /dev/rfssnap/0

ufsdump features

-Can be used to backup individual file systems to local or remote tape devices or disk drives -Can create incremental backups -Can back up groups of systems over the network from a single system. You can run ufsdump on each remote system through a remote shell or remote login, and you can direct the output to the system on which the drive is located. -The system administrator can restrict user access to backup tables -Has a built-in option to verify data on tape against the source file system

Pax features

-Provides better portability then tar or cpio -POSIX-conformant so that it is compatible with other systems -It can recover damaged archives -It can span multiple volumes

JAR file format features

-Security: Jar files can be digitally signed -Decreased download time: Jar files can be downloaded via HTTP -Compression: JAR format enables you to compress files for efficient storage -Packaging for extensions -Package sealing: JAR files can be sealed so that they can enforce version consistency -Package versioning: A JAR file can hold data about the files it contains -Portability: The handling of JAR files is a standard part of the Java platform's core API

ufs snapshot features

-destination path of the backing store files must have enough free space to hold the file system data -the backing store file location must be different from the file system that is being captured in a snapshot -the backing-store files can reside on any type of file system, including another UFS file system or an NFS file system -Multiple backing-store files are created when you create a snapshot of a UFS file system that is larger than 512GB

ufsrestore features

-restores files with their original owner, last modification time, and mode

Command used to display a further detailed information about snapshots

/usr/lib/fs/ufs/fssnap -i

Command used to display a summary of all the snapshots that have been created on a system, along with their corresponding virtual devices

/usr/sbin/fssnap -i

Name the steps to recovering the Root or /user file system on a SPARC system

1. Replace and partition disk if it has failed 2. Boot from DVD or CD-ROM, re-create the failed file system by issuing the newfs command: # newfs /dev/rdsk/<disk-partition-name> where <disk-partition-name> is the name of the raw disk partition that contains the corrupted file system 3. Check the new file system by using fsck: # fsck /dev/rdsk/<disk-partition-name> 4. Mount the new file system on a temporary mount point # mount /dev/dks/<disk-partition-name> /mnt 5. Change to the /mnt directory # cd /mnt 6. Write-protect the tapes so that you don't accidentally overwrite them 7. Load the tape and issue the following command: # ufsrestore rf /dev/rmt/0 The entire contents of the tape are restored to the file system. All permissions, ownerships, and dates remain as they were when the last incremental tape was created. 8. Verify that the file system is restored: # ls 9. Remove the restoresymtable file that is created and used by ufsrestore to checkpoint the restoration: # rm restoresymtable 10. Change to the root (/) directory: # cd / 11. Unmount the newly created file system: # umount /mnt 12. Check the new file system with fsck # fsck /dev/rdsk/<disk-partition-name> 13. If you are recovering the root (/) file system, create the boot blocks on the root partition by using the installboot command: # installboot /usr/platform/'uname -I' /lib/fs/ufs/bootblk /dev/rdsk/<disk-partition-name> The installboot command installs the boot blocks onto the boot disk. Without the boot blocks, the disk cannot boot. 14. Insert a new tape into the tape drive and back up the new file system: # ufsdump 0uf /dev/rmt/0n /dev/rdsk/<device-name> A level 0 backup is performed. You should immediately make a backup of a newly created file system because ufsrestore repositions the files and changes the inode allocation. 15. Reboot the system with a reconfiguration reboot # shutdown -y -g0 -i0 ok boot -r The system is rebooted.

Name the steps to recovering and restoring a damaged file system on a SPARC system

1. Unmount the corrupted file system /<filesystem> # umount /<filesystem> 2. After you unmount the file system, issue the newfs command to create a new file system: # newfs /dev/rdsk/<disk-partition-name> where <disk-partition-name> is the name of the raw disk partition that contains the corrupted file system 3. Check the new file system by using fsck: # fsck /dev/rdsk/<disk-partition-name> 4. Mount the new file system on a temporary mount point # mount /dev/dks/<disk-partition-name> /mnt 5. Change to the /mnt directory # cd /mnt 6. Write-protect the tapes so that you don't accidentally overwrite them 7. Load the tape and issue the following command: # ufsrestore rf /dev/rmt/0 The entire contents of the tape are restored to the file system. All permissions, ownerships, and dates remain as they were when the last incremental tape was created. 8. Verify that the file system is restored: # ls 9. Remove the restoresymtable file that is created and used by ufsrestore to checkpoint the restoration: # rm restoresymtable 10. Change to the root (/) directory: # cd / 11. Unmount the newly created file system: # umount /mnt 12. Check the new file system with fsck # fsck /dev/rdsk/<disk-partition-name>

List the steps to create a snapshot of the /export/home file system

1. fssnap -F ufs -o bs=/var/tmp /export/home 2. ufsdump 0ucf /dev/rmt/0 /dev/fssnap/0 OR ufsdump oucf /dev/rmt/0 'fssnap -F ufs -o bs=/var/tmp /export/home'

Command used to communicate with the tape drive from the command line

mt mt -f tape-device=name command output Commands -mt status Prints status information about the tape unit -mt rewind Rewinds the tape -mt offline Rewinds the tape, and, if appropriate, takes the drive unit offline by unloading the tape. -mt fsf count Forwards spaces the tape over the requested number of sequential file marks. -mt eom Spaces to the end of recorded media on the tape. -mt erase Erases the entire tape. -mt rewoffl Same as rewind

Utility used to copy files and directory subtrees to a single tape or file. This utility provides better portability than tar and cpio, so it can be used to transport files to other types of UNIX systems. POSIX-conformant so that it is compatible with other systems. Its portable to other UNIX systems It can recover damaged archives It can span multiple volumes

pax pax <mode> <options> Operation Modes -r read mode none list mode -w write mode -rw copy mode Command Options -r reads an archive file -w writes files to the standard output -a appends files to the end of an archive -b specifies block size -c matches all file archive members -f specifies <archive> as the pathname of the input or output archive -I interactively renames files or archive members -n selects the first archive member that matches each pattern operand -p specifies privileges -x specifies the output archive format

Pax command used to interactively select the files to copy from a current directory to a destination directory

pax -rw -i . <dest-dir>

Pax command used to list a verbose table of contents for an archive stored on a tape device

pax -v -f /dev/rmt/0

Pax command used to copy files to tape

pax -w -f /dev/rmt/0

Utility used to create tape or file-based archives. This format is commonly used for transferring collections of files between systems.

tar tar <options> <filename> <file-list> -c creates a tar file -t lists the names of the specified file -x extracts or restores files from a tar filename -v verbose. outputs information to the screen as tar reads or writes the archive. -f uses the tar <filename> argument as the name of the tar archive

DD command that can be used with tar to create an archive on a remote tape drive

tar cvf - <files> | rsh xena dd of=/dev/rmt/0 obs=128

Tar command to create an archive of the /home/bcalkins directory on tape device /dev/rmt/0

tar cvf /dev/rmt/0 /home/bcalkins

Tar command to list files in a tape device archive

tar tvf /dev/rmt/0

Tar command used to restore the file /home/bcalkins/.profile file from a tape device archive

tar xvf /dev/rmt/0 /home/bcalkins/.profile

Utility that allows you to create a read-only snapshot of a file system while the file system is mounted.

ufs snapshot

Utility used to back up all files in a file system.

ufsdump /usr/sbin/ufsdump <options> <arguments> <files-to-dump> Options 0 to 9 Specifies backup level a <archive-file> Instructs ufsdump to create an archive file b <factor> Specifies the blocking factor c Instructs ufsdump to back up to cartridge tape d <bpi> Specifies the tape density D Backs up to floppy disk f <dump-file> Specifies the destination of the backup l Specifies autoload n Specifies notify o Specifies offline s <size> Specifies the length of tape, size of disk or blocks S Estimates the size of the backup t <tracks> Specifies the number of tracks for 1/4-inch tape u Updates teh dump record v Verifies the contents of the medium against the source file system after each tape or disk is written w Lists the systems appearing in /etc/dumpates that have not been backed up within a day W Shows all file systems that appear in /etc/dumpdates and highlights file systems that have not been backed up Default options ufsdump 9uf /dev/rmt/0 <files-to-back-up>

Full backup of /users file system with ufsdump

ufsdump 0ucf /dev/rmt/0 /users

ufsdump command to backup a local /export/home file system on a Solaris 10 system to a remote Solaris 10 system called sparc1

ufsdump 0ucf sparc1:/dev/rmt/0

ufsdump command to see how much space a backup will require

ufsdump S <filesystem>

Utility used to restore some or all of the files archived with the ufsdump command

ufsrestore ufsrestore <options> <arguments> <filenames> command options h turns off directory expansion i runs ufsrestore in interactive mode r restores the entire contents of the medium into the current working directory R resumes the restoration x <filename(s)> selectively restores the files you specify t <filename(s)> checks the files specified against medium b <factor> specifies the number of 512-byte blocks to read m restores specified files into the current directory on disk s <n> skips to the nth backup file on the medium v Verbose

ufsrestore command to restore a file from backup that was created using ufsdump

ufsrestore f /dev/rmt/0 <filename>

ufsrestore command to display the contents of a tape

ufsrestore tf /dev/rmt/0


Conjuntos de estudio relacionados

Unit 10 - Final Chapters - Notes

View Set

EGEE 102- Ozone, Pollutants, and Fossil Fuels

View Set

Life Span Development Final Exam

View Set

Management Theory & Practice 15,16,17,18

View Set

5.3 Knowledge Check: Hypothesis Testing 2

View Set

Maternity: Women's Health/Disorders and Childbearing Health Promotion Set#1

View Set