Operating System - Linux
1753646 Members
5988 Online
108798 Solutions
New Discussion юеВ

Re: make tar archives muti volume...?

 
SOLVED
Go to solution
jackfiled
Advisor

make tar archives muti volume...?

Hi all
I want to make tar archive file.
Created tar file limited specified size

for example
In sub dir size is 3072MB, tar created files are 1535MB each

How can execute that command?
10 REPLIES 10
Huc_1
Honored Contributor

Re: make tar archives muti volume...?


In the gnu tar man page there is an -M qualifier this creates a multi volum tape !

I have never tryed such a long tar file myself but always have belief this did the trick ?

Have you tryed this ?

J-P
Smile I will feel the difference
Michael Schulte zur Sur
Honored Contributor

Re: make tar archives muti volume...?

Hi,

just curious. Is it because of limitted space on disk, that you want to split it? If not make the tar file one file and then split it using split or so.

greetings,

Michael
Thomas Vollmer
Advisor
Solution

Re: make tar archives muti volume...?

Hi,maybe You can give split-tar a try. It can create standalone tar's at the given size.You can find it under http://www.informatik-vollmer.de/software/split-tarThomasPS: I'm not related to J├Г┬╝rgen Vollmer in any kind ;
jackfiled
Advisor

Re: make tar archives muti volume...?

-M options
How it applied..?
I can not find example.
Thierry Poels_1
Honored Contributor

Re: make tar archives muti volume...?

hi,

more complex, but does work:


mknod /tmp/mypipe p
split -b1M - /dir/mytar < /tmp/mypipe &
tar cvf /tmp/mypipe /dir/files
rm /tmp/mypipe

to restore:
cat /dir/mytar* | tar xvf -

adjust the size parameter in the split commands to your needs (set at 1MB in this example).

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Mark Grant
Honored Contributor

Re: make tar archives muti volume...?

Jackfiled,

Huc is talking about GNU tar. This tar doesn't come with HPUX. You will need to install it first. You can then use the "-M" option.

You can get GNU tar here.

http://hpux.connect.org.uk/hppd/hpux/Gnu/tar-1.13.25/
Never preceed any demonstration with anything more predictive than "watch this"
Huc_1
Honored Contributor

Re: make tar archives muti volume...?

Ah did not understand this to be a HP-UX question ... as this is linux forum... but Yes do as mark suggest if this posible for you !

Thank, mark

J-P
Smile I will feel the difference
Mark Grant
Honored Contributor

Re: make tar archives muti volume...?

Actually Huc, I think I got it wrong :)

This is in the linux forum but my head was in the HP-UX forum!
Never preceed any demonstration with anything more predictive than "watch this"
jackfiled
Advisor

Re: make tar archives muti volume...?

thank you for your reply my problem..
I really appreciate that. ^^