LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 11-30-2007, 09:54 AM   #1
300zxkyle
LQ Newbie
 
Registered: Jun 2007
Distribution: OpenSuSE 10.2
Posts: 13

Rep: Reputation: 0
Question 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
 
Old 11-30-2007, 11:39 AM   #2
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Does the man page not yield anything like this?
 
Old 11-30-2007, 03:28 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,950
Blog Entries: 11

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
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
 
Old 11-30-2007, 04:15 PM   #4
Samotnik
Member
 
Registered: Jun 2006
Location: Belarus
Distribution: Debian GNU/Linux testing/unstable
Posts: 471

Rep: Reputation: 40
split(1) is what you want.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
tar multi-volume (-M): how to specify size? jhwilliams Linux - Software 1 08-16-2007 07:39 PM
tar multiple volume archive - volume script RGummi Linux - General 2 08-31-2006 04:08 PM
need some help with muli-volume tar (ubuntu, bash, gnu tar) MattCarp Linux - General 4 06-05-2006 08:15 AM
Kmix PCM volume problem (auto. set to 0 at every new track) Grisha8 Linux - Software 2 12-01-2005 02:48 AM
multi-volume tar exodist Linux - Software 11 01-18-2005 03:32 AM


All times are GMT -5. The time now is 05:25 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration