1847633 Members
3392 Online
110265 Solutions
New Discussion

Tape backup

 
SOLVED
Go to solution
bhagirathp
Occasional Advisor

Tape backup

Hi all,

I am new to HP-UX and request your help.I want take backup of application logs to tape and to restore them when I need.
Please tell the commands to take backup to tape and restore to same folder.Tape is DDS4.

5 REPLIES 5
Devender Khatana
Honored Contributor
Solution

Re: Tape backup

Hi,

There are so many option with you

1. tar
2. cpio
3. fbackup
4. dd

The easiest and most commonly used is tar

TO Backup use
#tar -cvf /dev/rmt/xmn ./path_to_directory

To Display contents of tape
#tar -tvf /dev/rmt/xmn

To Restore to alternate location use in that directory
#tar -xvf /dev/rmt/xmn .

man tar for deails./dev/rmt/xmn is your tape device file.

HTH,
Devender
Impossible itself mentions "I m possible"
Eric Antunes
Honored Contributor

Re: Tape backup

Hi,

I recomend you to use SAM (System Adm. Manager). Just type sam:

#sam

And go to Backup and Recovery -> Interactive Backup and Recovery -> [select yout tape drive] -> Back Up Files Interactively... -> Choose you backup scope...

Best Regards,

Eric Antunes
Each and every day is a good day to learn.
Muthukumar_5
Honored Contributor

Re: Tape backup

Check tape status as,

# mt -f /dev/rmt/

Backup
# tar -cvf /dev/rmt/ directory

Recover - Testing
# tar -tvf /dev/rmt/

Recover
# tar -xvf /dev/rmt/ .

See tar man page on EXAMPLES part.

--
Muthu
Easy to suggest when don't know about the problem!
MarkSyder
Honored Contributor

Re: Tape backup

You can do this with tar:

tar cvf /dev/rmt/0m dir

where /dev/rmt/0m is your tape drive (you may want to check this) and dir is the full path of the directory containing the logs (without a leading / - e.g. if you want to back up /var/adm/syslog you would put var/adm/syslog).

The cvf is:

c = create
v = verbose (echo to screen)
f = file (device receiving the backup).

To restore you would type the same command except you would replace the c with an x (extract).

For greater reliability you may want to use a proper backup product such as Data Protector - an HP product that provides much greater flexibility than tar.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
bhagirathp
Occasional Advisor

Re: Tape backup

Thanks guys for your help bye...