Operating System - HP-UX
1834136 Members
2220 Online
110064 Solutions
New Discussion

Re: Spool file from tar backup

 
R.Suresh
Frequent Advisor

Spool file from tar backup

Hi,

I am handling the data-centre of a MNC bank.

For auditing purpose I need to give the
Backup logs of all tar backups.

While taking backup I need to monitor also.

I tried with nohup and the following

tar cv /test > /test.txt 2>&1

Both gives output to the file,But I need
the process display also.

Can any one help me?

Thanks & Regards
R.Suresh.





PDLS
3 REPLIES 3

Re: Spool file from tar backup

Try this:

tar cv /test 2>&1 | tee /test.txt

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Ian Dennison_1
Honored Contributor

Re: Spool file from tar backup

Perform a 'tail -f /tmp/file1' to monitor the logfile, in a separate window.

You could try the 'tar xxxxxxx |tee /tmp/logfile' command but tar does not write to the output that the 'tee' command will capture.

If you need a logfile for tracking purposes, why not perform a 'script /tmp/scriptfile1' command before the tar, which will write all output of tar to the script file specified.

Share and Enjoy! Ian
Building a dumber user
Jeff Machols
Esteemed Contributor

Re: Spool file from tar backup

use the tee command, just make sure you include stderror in the redirect

tar -cv /test 2>&1 | tee logfile