On September 22, 2004 12:55, hugenots wrote:
> welcome newbie,
>
>   can someone sugest nice script for making tar arcives with given
>   size from given folder, presuming that data in folder is more than
>   given volume size; that volumes must be independet form each other
>   (no file spliting); that volume name is "smart" (e.g. vol1.tar;
>   vol2.tar vol3.tar; ...)
>
>   maybe I'm thinking in the wrong direction, then please enlighten me
>
>   :)
>
>   the idea is to make tar arcives for storing to dvd, except storing
>   will be done once in a month, but archiving should be perfomed more
>   or less every night. so there will be hard copy and daily backup.
>
> --------------------------------
> force, my friend, is violence!
>  hugenots                          [EMAIL PROTECTED]

I've been thinking about the same thing. Haven't come across a tool to do it 
yet (though I've haven't searched all that hard).

I sometimes use the following type of command to create a compressed tarball:

        tar cvf - . | gzip -9 > tarball.tgz

But of course I don't know the size of the tgz file until it's done. If it's 
too big, I have to rework it to fit (I'm still using CDs).

I've been pondering whether there's a way, possibly in perl, to open a pipe to 
gzip, feed it files one at a time, and check the size each time. Of course 
there's complications like whether all the data has been flushed to disk when 
you check the size, and what to do when the last file makes it too big. If I 
ever get time I might see if I can cook up a perl script using existing tools 
to do something like this.

-- 
Ron
ron dot hunterduvar at shaw dot ca

Opinions expressed here are all mine. Rights to use
these opinions are granted under the GNU GPL.

____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to