-   Linux - Software (
-   -   tar how to auto next volume? (

300zxkyle 11-30-2007 09:54 AM

tar how to auto next volume?
I have an older system running an older version of reiserfs with a file size limit of 4gb. I have a very large amount of data to backup, roughly 250gb kept on the file system. tar seems to fit the best however I have to manually enter the volume name each time I hit the 4gb limit for the filesize. Is there a way that I can get tar to auto increment the name of the volume each time a new file has to be created?

this is what I have been doing:


tar -vc -L 4194000 -f backup.tar /directory/to/backup > backup_log.txt
Which produces every 4gb


Prepare volume #2 for 'backup.tar' and hit return: n backup_2.tar

indienick 11-30-2007 11:39 AM

Does the man page not yield anything like this?

Tinkster 11-30-2007 03:28 PM

It does indeed - and it can't be done w/o scripting. The feature
is (was) meant for tapes initially, and as such didn't work non-
interactively. With the -F option, you can run a script to rename
the chunks so they don't get overwritten, and with --volno-file you
can store info about the current version so the script for -F can
use that information ....


Samotnik 11-30-2007 04:15 PM

split(1) is what you want.

All times are GMT -5. The time now is 04:28 PM.