LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   tar how to auto next volume? (http://www.linuxquestions.org/questions/linux-software-2/tar-how-to-auto-next-volume-603509/)

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:

Code:

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

Code:

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

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 ....



Cheers,
Tink

Samotnik 11-30-2007 04:15 PM

split(1) is what you want.


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