tar -czvf /u05/appltest/backup/apps.tgz /u05/appltest/apps *execute this as the appltest user
tar -czvf /u05/appltest/backup/inst.tgz /u05/appltest/inst *execute this as the appltest user
tar -czvf /u06/oratest/backup/apps_st.tgz /u06/oratest/db/apps_st *execute this as the oratest user
tar -czvf /u06/oratest/backup/tech_st.tgz /u06/oratest/db/tech_st
tar -czvf /u03/appldev/backup/apps.tgz /u03/appldev/apps
tar -czvf /u03/appldev/backup/inst.tgz /u03/appldev/inst
tar -czvf /u04/oradev/backup/db.tgz /u04/oradev/db
tar -xvzf /u03/appldev/backup/apps.tgz -C /u03/appldev/apps
Unix ---> tar
The tar (tape archiver) program is useful for storing a bunch of files in one file (traditionally on a magnetic tape, but it doesn't have to be). The syntax for this command is
tar [key] [name ...]
where key is specified by a plethora of options (see abridged list below and unabridged list in the man pages) and name is either the file name or device name.
Here are some of the more commonly used keys:
c Creates a new tape.
f Used for taring to a tape.
t Lists the contents of a tar file.
v Turns verbose on.
x Extracts selected files. If no file
argument is given, the entire contents
of the tar file is extracted.
Here is the syntax I use to create and read tar files:
tar cvf filename.tar directoryname <-- creates
tar xvf filename.tar directoryname <-- reads
If you wish to create or read a tar file off of a magnetic tape, replace filename.tar with /dev/drivename.
Example :
tar cvf /dev/rmt/0 /bin /usr/bin creates an archive of /bin and /usr/bin, and store on the tape in /dev/rmt0.
No comments:
Post a Comment