Unix administration - tar or dump and restore commands on Compaq Tru64 UNIX or Unix - restore from tape?

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > September 2004 > tar or dump and restore commands on Compaq Tru64 UNIX or Unix - restore from tape?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author tar or dump and restore commands on Compaq Tru64 UNIX or Unix - restore from tape?
chad pauli

2004-09-22, 9:21 pm

I am new at a company that has a Unix server and they have no documentation
or anyhting. I am a average Unix user and I am trying to figure out a few
things.

They have a script I assume that runs a backup tape every night of just one
area of the data files. No documentation or anything and no one knows what
or how its being done. So no idea if they are using tar or dump. I am
assuming their either are using a tar or dump command / script.

I have been reading the MAN pages for the system to try to figure out how
to format the line to do say a tar backup. I also need to know how to do
a restore from a tar file assuming they are using tar. Or if they are
using dump as I understand you can use a restore or rrestore if dump was
used?

If anyone is out there using some nice tar or dump commands or scripts I
would love to study them and modify them for my use. Also restore scripts.
I want to make a tar and dump script to back up the entire system and not
just the data files. I assuem its root that is everything to do a full
disaster restore from.

I have a few examples and let me know if I am putting together the right
command lines.

The system is using
Compaq Tru64 UNIX V5.1 (Rev. 732) (bisalpha) (pts/4)

Below is an example from the man pages and then below it are some of my
thoughts of what I need to type to back up all the files in my examples on
the system

EXAMPLES

1.. To create a tar archive to device /dev/ntape/tape0, enter:
tar cvfb /dev/ntape/tape0 20 -e ./foo -C /usr/glenn . \

-e ./bar -e ./logs/logfile -C /usr/gaston .

The preceding command line specifies a blocking factor of 20. The

resulting archive contains all files and directories in /usr/glenn

except for file ./foo and all files and directories in /usr/gaston

except for files ./foor, ./bar, and ./logs/logfile.

now my examples and I have not yet tried this because its a live system and
there is no "test" system to try this on.

****************************************
*********************

tar cvfb /dev/ntape/tape0 20 -C /usr/glenn . -C /usr/gaston .

should back up all files and subdirectories of /usr/glenn and /usr/gaston to
tape ??????

tar cvfb /dev/ntape/tape0 20 -C /u1/Luminx/live .

should back up all files and subdirectories in /u1/Luminx/live directory ???

tar cvfb /dev/ntape/tape0 20 -C /u1/Luminx .

should back up all files and sub directories in /u1/Luminx ????

tar cvfb /dev/ntape/tape0 20 /u1/Luminx/test/data/hp.txt .

should back up the hp.txt file ????

tar cvfb /dev/ntape/tape0 20 -C /root .

will this back up all of the root and all directories and sub directories
and files as in a total hard drive / system back up?

****************************************
********************

tar cvfb /dev/ntape/tape0 20 /u1/Luminx/test/data/hp.txt .

should back up the hp.txt file ???? in this example what would eb the
command to restore this file from tape back to its origional location?



The server has the tape drive in it and its tape0 or device tape0, I have
confirmed that.

I am going to try to see if the company that set up and supports the
application software on this is willing to help me, with out a cost.

My main assignment is to simply test the tapes and figure out how to restore
the date from the tapes back to the system and make documentation and or
restore script to do so.

to restore to the origional file locations or to redirect them to another
directory.

Also on this flavor of Unix, where or where most likely would one make and
put the automated backup script and since it automatically backs up every
night, what file, config file, process or task would be starting and
running the backup if anyone can guess at that?



I am welcome to ideas and examples of scripts or command line commands to do
backup / tar / bump and restores.

The most critical directory is the /u1/Luminx/live/data/ directory

but the entire application and its data sits in /u1/Luminx/

I am working on figuring out the method used to back up so then I can write
a script or command line command to do the restores. I have not yet located
the current backup script or command that the system is running each night.

Sorry I do not have more specific info. Any and all ideas, scripts,
examples would be appreciated.



Sincerely,

Chad

c-paul@netexpress.net




Adam Price

2004-09-22, 9:21 pm

On Thu, 16 Sep 2004 23:39:04 GMT
in Message-ID: <sup2d.62206$D%.51290@attbi_s51>, chad pauli wrote:

> I am new at a company that has a Unix server and they have no documentation
> or anyhting. I am a average Unix user and I am trying to figure out a few
> things.
>
> They have a script I assume that runs a backup tape every night of just one
> area of the data files. No documentation or anything and no one knows what
> or how its being done. So no idea if they are using tar or dump. I am
> assuming their either are using a tar or dump command / script.
>

Don't assume that you have backups, make sure...

> I have been reading the MAN pages for the system to try to figure out how
> to format the line to do say a tar backup. I also need to know how to do
> a restore from a tar file assuming they are using tar. Or if they are
> using dump as I understand you can use a restore or rrestore if dump was
> used?
>

You could use grep on the script to find out if it uses dump or tar,
however if it is a tru64 system then you should be using vdump.

> If anyone is out there using some nice tar or dump commands or scripts I
> would love to study them and modify them for my use.

Don't write your own, use something from this list...
http://www.backupcentral.com/toc-fr...p-software.html
Saves lots of work and means that no-one else will get stuck in the same
hole you are in now.


> Also restore scripts.
> I want to make a tar and dump script to back up the entire system and not
> just the data files. I assuem its root that is everything to do a full
> disaster restore from.

Bare metal restore of a Tru64 V5 box is a tough task. You may be better to
do a clean install from media and a data recovery.


>
> I have a few examples and let me know if I am putting together the right
> command lines.
>
> The system is using
> Compaq Tru64 UNIX V5.1 (Rev. 732) (bisalpha) (pts/4)


I've added comp.unix.tru64 to the newsgroups line.

>
> Below is an example from the man pages and then below it are some of my
> thoughts of what I need to type to back up all the files in my examples on
> the system
>

<SNIP Tar based examples> Don't use Tar for backups.


>
>
> The server has the tape drive in it and its tape0 or device tape0, I have
> confirmed that.
>
> I am going to try to see if the company that set up and supports the
> application software on this is willing to help me, with out a cost.

This is a good plan.

>
> My main assignment is to simply test the tapes and figure out how to restore
> the date from the tapes back to the system and make documentation and or
> restore script to do so.
>

This is going to be a bit harder because you don't know what format the
tapes are in.
As I suggested above, if you find the original backup scripts you can use
grep to search for likely commands, however you could attack this from the
opposite direction. If you are able to find a window when the tape drive is
not in use then you could use dd to read the first few blocks of the tape
into a file and then use the 'file' command to read them.

> to restore to the origional file locations or to redirect them to another
> directory.
>

This part should be easy once we know how the backup was made.

> Also on this flavor of Unix, where or where most likely would one make and
> put the automated backup script and since it automatically backs up every
> night, what file, config file, process or task would be starting and
> running the backup if anyone can guess at that?
>

Professional backup software(eg Legato NSR) will have it's own scheduler
'home-grown' stuff would be scheduled out of cron. However there is another
possibility if the system is running a commercial database, many of them
have there own backup tools EG Oracle's RMAN.

Hope this helps some.
Adam
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com