Backups. Ching-li Peng CMSC691X Date: June 11, 2002. Contents. General rules of backups Backup devices and media Setting up an incremental backup regime Restoring from dumps Dumping and restoring for upgrades Using other archiving programs Using multiple files on single tape AMANDA.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Date: June 11, 2002
Builds up a list of files that have been modified since last previous dump, then pack those files into a single file to archive to an external device.
Using d specifies the tape density in byte per inch, and s specifies size in kilobytes.
#dump 5usdf 60000 6250 /dev/rst0 /work
dump [flag] [size] [density][f:send output to this tape device][filesystem]
Restoring individual files
To determine which tapes contain the version of files user wanted.
To create and cd to a temporary directory such as /var/restore
To restore i, ls, cd and pwd
To mark the files you want to restore with add command
When you are done selecting, type extract to pull files form the tape.
Restore i reads the catalog from the tape and then lets you navigate though the directory of the dump.
For example restore the file /users/janet/jamlort from a remote tape drive.
Determine which tape contains this file
#rsh tapehost mt –f /dev/nst0 fsf3
Rrestore xf tapehost:/dev/nst0 /users/janet/iam.lost
Tar cf –fromdir |(cd todir; tar xfp- )
-c , --create a new archive
-d, --compare the files store in tarfile with others
-r, --append other files to the end of the existing archive
-t, --list the names of files stored in archive
-x –extract, --get
Create an archive of /bin and /usr/bin(c), show the command working (v), and store on the tape in /dev/rmt0:
tar cvf /dev/rmt0 /bin /usr/bin
List the tapes’s contents in a format like ls –l
tar tvf /dev/rmt0
cpio—copy file archives in from or out to tape or disk, or to another location on the local machine. Each of the three flags –i (copy in),-o(copy out) or –p (copy files in anther directory)
#find fromdir –depth –print| cpio –padm todir
dd: copies its input files to as put files
--with two tape drives,
%dd if = /dev/rtm8 of = tfile cbs=166
%dd if = tfile of = dev/rtm9 cbs= 166
When dump or some other commands writes a stream of bypes out to a tape device and then closes the device file, an “end of file” marker is automatically placed on the tape.
Using mt command position a tape at a particular stream or “file set,” as mt calls them. “mt”is especially useful if you put multiple files.
#mt –f tapename command
--tapename is the device name of the tape
-- -f is forest
-rew rewinds the tape to the beginning
-offl put the tape offline. Some dump tape scripts use this to eject the tape.
-status prints informaiton abou the current status of tape drive
-fsf [count]fast-forwards the tape. [count] is default to 1.
-bsf [count] backspace count files. If you are too far forward , your best bet is to rew it and start again from beginning