Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm dumping an svn repository to a giant USB disk that is formatted FAT due to necessity (treat this as unchangeable).

It conks out when you try to create a file larger than 4 gb.

I need a tool that I can pipe data to that will create files of arbitrary size that when catted together will be the original file. I can write a tool to do this, but if one already exists I'd rather use it.

Cheers

EDIT: A second look at the split man page looks like it might work.

share|improve this question

1 Answer 1

up vote 8 down vote accepted

SVN dumps are one gigantic file, and FAT conks out after 4GB.

split is a unix tool that sinks input into a series of files. From the manpage:

NAME
       split - split a file into pieces

SYNOPSIS
       split [OPTION]... [INPUT [PREFIX]]

DESCRIPTION
       Output  fixed-size  pieces of INPUT to PREFIXaa, PREFIXab, ...; default
       size is 1000 lines, and default PREFIX is `x'.  With no INPUT, or  when
       INPUT is -, read standard input.

Something like svnadmin dump $reponame | split -d -b 1073741824 "$reponame." -d will give you $reponame.1, $reponame.2 and so on, with a gigabyte file each. Hopefully FAT will continue to function with multiple large files.

To put them back together again, use cat: cat $reponame.* | svnadmin load $reponame"

share|improve this answer
    
That's what I ended up doing, although I didn't see the -d flag. Cheers! –  richo Mar 29 '10 at 4:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.