Operating System - HP-UX
1830899 Members
3421 Online
110017 Solutions
New Discussion

how to check backup time by using tar ?

 
natis
Frequent Contributor

how to check backup time by using tar ?

how to check backup time by using tar ?

Anyone can help me.
6 REPLIES 6
Luk Vandenbussche
Honored Contributor

Re: how to check backup time by using tar ?

Put in a script

date (starttime)
tar command
date (end time)

So you can calculate how long your backup was running
whiteknight
Honored Contributor

Re: how to check backup time by using tar ?

Hi natis,

you can use

#timex tar xxxxxx


WK
Problem never ends, you must know how to fix it
Dennis Handly
Acclaimed Contributor

Re: how to check backup time by using tar ?

Did you want to time how long it took as you got in other answers, or when it was done?
AwadheshPandey
Honored Contributor

Re: how to check backup time by using tar ?

DH!! He can both from Luk's reply :)
It's kind of fun to do the impossible
Dennis Handly
Acclaimed Contributor

Re: how to check backup time by using tar ?

>Awadhesh: He can both from Luk's reply :)

Not if only the tarfile was available.
Geoff Wild
Honored Contributor

Re: how to check backup time by using tar ?

I think he wants to know the backup time of an existing tar archive.

Tar does NOT store it's archive date.

What you can do, is create a file prior to the tar command in your script, something like:

LABEL=LABEL.`date +%b%M%d%H`

touch $LABEL
then
tar cvf sometarfile.tar $LABEL morefile

Then, to see timestamp of the archive,

tar tvf sometarfile.tar |grep LABEL

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.