[PLUG] 2 TAR questions

Terry Layne plug at laynesoftware.com
Sun Jun 22 08:47:01 UTC 2003


On Sun, 22 Jun 2003 08:57:57 -0500 (CDT), David Fleck wrote
> On Sat, 21 Jun 2003, guy1656 wrote:
> > SO, the question: What is a best/most proper way to create a number of backup
> > files that split up into a number of <=2GB files. For example, is there a way
> > to carve up a 5 GB tar.gz file into 'filename-1.tar.gz,' 'filename-2.tar.gz,'
> > and 'filename-3.tar.gz,' of around 2GB, 2GB and 1GB respectively.
> 
> My first inclination would be to use 'split'.  man split, etc.
> 

Sorry if this has already been covered, I walked into the middle of the
thread.  But I get by just fine using:

tar -cv  -L 1000000 -F myscript -f archive.tar stuff/to/backup

This creates chunks that are 1 GB in size.  myscript is actually the backup
script that calls this tar command in the first place.  When called in this
instance it provides the next archive name.  That way I end up with
backup00.tar, backup01.tar, etc.  When all done I gzip the lot of them.  I
picked 1 GB because after gzip it is safely small enough for a cdrom.

I don't think you'd want to split tar.gz files because you'd need to put them
back together to restore anything.  

--
Terry Layne
Portland, OR




More information about the PLUG mailing list