1825804 Members
2430 Online
109687 Solutions
New Discussion

Re: About tar command

 
SOLVED
Go to solution
juno2
Super Advisor

About tar command

I would like to use "tar" to backup files , does "tar" support append file ? thx.
4 REPLIES 4
Sridhar Bhaskarla
Honored Contributor
Solution

Re: About tar command

Hi,

Yes. Look at "u" option of tar command in it's man page.

If it is on HP system, i would suggest to use fbackup. You can do incremental backups with it and it can spawn multiple tapes.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Tim Adamson_1
Honored Contributor

Re: About tar command

Yes you can do it by using the r option.

From the tar man page:

r Add the named file to the end of the archive. The same blocking factor used to create the archive must be used to append to it. This option cannot be used if the archive is a tape.


Play around with it and give it a try.


tim
Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.
Tim Adamson_1
Honored Contributor

Re: About tar command

I just played around by archiving to a disk tar file:

# cd /var/tmp/tim
#
# echo hello > a
# echo hello > b
#
# ll
total 4
-rw-rw-rw- 1 root sys 6 Sep 10 11:03 a
-rw-rw-rw- 1 root sys 6 Sep 10 11:03 b
#
# tar cvf ./junk.tar a
a a 1 blocks
#
# tar vrf ./junk.tar b
a b 1 blocks
# tar tvf ./junk.tar
rw-rw-rw- 0/3 6 Sep 10 11:03 2003 a
rw-rw-rw- 0/3 6 Sep 10 11:03 2003 b
#
#


Tim

Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.
Steven E. Protter
Exalted Contributor

Re: About tar command

tar is a good backup tool for data, but it won't work on open database files like oracle.

Standard tar won't do files bigger than 2 GB. A patch from HP will bump it up to a max of 8 GB.

GNU tar has more features and the higher filesize limit.

tar cvf will create a tar archive.
tar rvf will update and add to a tar archive.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com