Sec. 40 Backup and Recovery Methods Flashcards
cpio and tar
cpio and tar create and extract archives of files .
gzip, bzip2, and xz
Archives are often compressed with gzip, bzip, or xz. the archive file may be written to disk , magnetic tape, or any other device which can hold files.
Archives are very useful for transferring files from on filesystem or machine to another.
dd
dd -this powerfull utility is often used to transfer raw data between media. it can copy entire partitions or hard disks .
rsync
rsync - this powerful utility can synchronize directory subtrees or entire filesystems across a network, or between different filesystems locations on a local machine.
mt
mt - this utility is useful for querying and positioning tapes before performing backups and restores.
Describe some of tar commands features :
- when creating a tar archive, for each directory given as an arguement, all files and subdirectories will be included in the archive.
- when restoring, it reconstitutes directories as necessary.
- it even has a –newer option that lets you do incremental backups
- the version of tar used in linux can also handle backups that do no fit on one tape or whatever device you use.
tar
-arg - directory
-description: for each directory given, all files and subdirectories will be included in the archive.
when restoring tar, it reconstitutes ….?
when restoring tar , it reconstitutes the directories as necessary.
tar even has a –newer option that …….?
tar even has a –newer option that lets you do incremental backups
by default tar will recursively …….?
by default tar will recursively include all subdirectories in the archive.
archive
an archive is a file that contains the contents fo many files , while still identifying the names of the files , their owners and so forth.
-in addition archives records access permissions , user, and group , size in bytes, and data modification time.
the files in archives are called ……?
memebers
the term extraction refers to the process of copying an archive member (or multiple members) into a file in the file system.
Extracting all the memebers of an archive is often call extracting the archive.
or unpacking the archive.
what does the term extraction refer to w.r.t. archives ?
the term extraction refers to the process of copying an archive member or multiple members into a file in the file system.
extracting an archive does not destroy the archive’s structure, just as creating an archive does not destroy the copies of hte files that exist outside the archive.
You may list the members in a given archive, or append members to a pre-existing archive.
the tar program provides teh abiltiy to create tar archives, as well as varius other kinds of manipulation.
You can use tar archives in many ways. there are three important ones: storage, backup, and transportation.
conventionally , tar archives are given names that end with …..?
.tar
what are three main options of the tar program?
- –create
- –list
- –extract
the main types of arguements of the tar fall inot one of two classes. what are they?
- operations
- options
w.r.t tar am I required to specify options?
no
Can i specify more than one operation with tar?
no
tar –create or tar -c
create a new tar archive
tar –list or tar -t
list the contents of an archive
tar –extract or tar -x
extract one or more members from an archive.
tar –file=archive-name or tar -f archive-name
specify the name of an archive file
tar –verbose or tar -v
show the files being worked on as tar is running
if I want to see the progress of tar as it writes files into the archive , I can use what option?
–verbose
when reading archives , tar by default prints only the names of the members being extracted.
when writing archives tar does not print file names by default.
tar –same-permissions or tar -p
ensures files are restored with their original permissions.
tar -x or tar –extract
extracts members from a archive, all by default.
I can narrow the list to only specify specific files .
if a directory is specified, than all included files and subdirectories will are also extracted.
what must I specify when creating an archive?
what/which files I want placed in the archive.
is the –file=file_name.tar considered one arguement or two ?
one
tar always sees its first arguement as an _________ ?
option
when using tar and using the long options is order important?
no
when does the order of the options become more important?
when using the short options versions.
when creating an archive using tar does it destroy the orginal files ?
no
what access would i need to the working directory in order to create an archive in that directory.
write access
what would happen if i did the following:
$ tar –create –file=collection.tar jazz and the archive collection.tar already existed.
the orginal collection.tar would be overwritten
If I would like to add files to an already esixting archive what option would I use?
–append ; -r
instead of the option –create, -c
How would I archive a directory?
by specifing the directory name as the filename arguement in tar.
where is the archive placed when tar program is invoked?
in the directory that tar was invoked.
what is the short version of the –list option for tar?
-t
I can force GNU tar to show member names when creating an archive by using what option?
–show-stored-names
with what option can I do incremental backups using tar?
–newer ; -N
when ever I use the option –newer or -N. I need to specify one of two things. what are they?
- a date
or
- a qualified file name.
rsync has the ability when copying files from on directories, it will only ________
will be copied over.
differences
gzip
uses lempel-ziv coding (LZ77 ) and produces .giz files
bzip
uses burrows-wheeler block sorting text compression algorithim and huffman coding and produces .bz2 files .
do decompression times vary as much as compression times ?
no
what is rarely used w.r.t. file compression?
.zip files
How would use compression at the same time as tar w.r.t. the following example:
$tar zcvf source.tar source.
$ tar zcvf source.tar.gz source
can compression and archiving happen at the same time?
yes.
it is often desired to compress files to save……?
- diskspace
and or
- lower network transmission time.
modern machines would find the process of _____________-__________-__________ faster than transmiting uncompressed files
compress - transmit-decompress
For larger files what two compression utilities are used ?
- bzip2
or
- zx
For smaller files what compressing utility is used?
gzip
If I wanted to create a 10mb file filled with zeros what would I do w/ dd?
$ dd if=/dev/zero of=outfile bs=1M count=10
dd is one of the _________ ________ and is
_______ _________
dd is one of the orginal unix utilities and is extermely versatile.
Using dd how would I create a backup for /dev/sda1?
$ dd if=/dev/sda1 of=partition1.img