# Cant backup failing 40GB w/ streams. mfstools wont support >2GB back file



## ElJefe (Mar 9, 2002)

Help...

I am pretty Linux saavy but I think I am forgetting something major and I need a sanity check. 

I am trying to backup an original 40Gb series2 disk that has a number of recordings. I connected the drive to a Xeon box I have laying around and connected a 250GB drive as well. I have tried booting the free MFSTools 2.0 as well as the fancy payware PTV disk.

I have mounted the 250GB as ext2, reiserfs and vfat32 and I see all 250GB. I mount it as /mnt/c

When I run 'mfsbackup -f 9999 -1so /mnt/c/tivo.bak /dev/hdb' the backup starts but dies when the destination file reaches 2GB (2147MB). It is hitting a 2GB file size max. 

How can I backup a nearly full TiVO disk if my dest file is limited to 2GB? Is there a switch to make split files? What am I missing?

I am used to dealing with 2.6 based kernels so it has been a while since I had to deal with a file size limitation.

Thanks to all who read or reply!


----------



## JamieP (Aug 3, 2004)

ElJefe said:


> What am I missing?


This was a bug in the mfstools 2.0 build. It wasn't built with large file support.

If you pipe the output, it works. For example,

```
mfsbackup -f 9999 -1so - /dev/hdb > /mnt/c/tivo.bak
```
Most people will never notice this little buglet since they are dumping to a FAT file system that also has a 2GB file size limit.


----------



## ElJefe (Mar 9, 2002)

I got it to backup by piping it to split with a 2000MB limit. Now I cant restore it... =(

mfsbackup -a -so - /dev/hdb | split -m 2000m tivobak_

created 19 2000MB files with the tivobak_ prefix (tivobak_a, tivobak_b, etc)

When I run 'cat tivobak_* | mfsrestore -r 4 -xzpi - /dev/hdb` I get a segfault from mfstools

I tried piping to std input from dd as well and it still segfaults.... God I wish I had source to mfstools..


----------



## HomeUser (Jan 12, 2003)

> God I wish I had source to mfstools..


It's your lucky day SourceForge.net MFS Tools


----------



## ElJefe (Mar 9, 2002)

Yeah, tried recompiling the beta snapshot available on sourceforge and I still get the segfault on the restore..

cat tivobak_* | restore -s 127 -r 4 -xzpi - /dev/hda

Segmentation Fault

I can pipe to dd and dd likes it. mfsrestore or the new version restore gags on the pipe to stdin from cat.

Ugh ugh ugh... I have the image with all of the streams backed up. Just cant get it to a new drive...


----------



## HomeUser (Jan 12, 2003)

Hmm maybe *cat tivobak_* > - | restore -s 127 -xzpi - /dev/hda*


----------



## JamieP (Aug 3, 2004)

The alpha/beta snapshot is broken. Don't use it, unless you are prepared to debug the remaining problems. If you want to compile from source, make sure you checkout the MFSTOOLS2.0 cvs tag.

Redirects from stdin/stdout don't have the large-file-support problem, even in mfstools 2.0 and work fine with backup files >2GB.

Why bother with split if you have a file system that can handle files >2GB?


----------



## classicsat (Feb 18, 2004)

Why not just dd the drive to a file? You have plenty of space, correct?


----------



## ElJefe (Mar 9, 2002)

I ended up doing the mfsbackup driveA | mfsrestore driveB approach. The source and dest dirves were dissimilar in size so a block for block dd copy would not have worked. 

The cat tivobak_* did not work as mfstools would seg fault when taking stdout from cat.


----------



## laddanator (Nov 23, 2012)

JamieP said:


> This was a bug in the mfstools 2.0 build. It wasn't built with large file support.
> 
> If you pipe the output, it works. For example,
> 
> ...


I change the beginning command with mfsbackup to backup my recordings also because I am moving from a big sata drive back down to my 500 gig IDE (sata drives no matter the adapter will cause my box to freeze and the IDE will not) drive and the .bak file ended up being 120 gigs. Now when I try to restore with mfsrestore, I get an error "value too large for data type" (Using Linux Mint). Any ideas on a command that would allow the restore? Is there a pipe command to by pass this error and restore?

My command. Makes backup fine



> mfstool mfsbackup -Tao - /dev/sdc > /mnt/Tivo/Syd.bak


----------



## unitron (Apr 28, 2006)

laddanator said:


> I change the beginning command with mfsbackup to backup my recordings also because I am moving from a big sata drive back down to my 500 gig IDE (sata drives no matter the adapter will cause my box to freeze and the IDE will not) drive and the .bak file ended up being 120 gigs. Now when I try to restore with mfsrestore, I get an error "value too large for data type" (Using Linux Mint). Any ideas on a command that would allow the restore? Is there a pipe command to by pass this error and restore?
> 
> My command. Makes backup fine


The way to do what you want to do is copy all the shows off of the SATA via TiVo Desktop (choose the slower transfer option), and then install your 500GB IDE and copy the shows back from the computer.

No need both of us learning this the hard way.


----------



## laddanator (Nov 23, 2012)

unitron said:


> install your 500GB IDE and copy the shows back from the computer.
> 
> No need both of us learning this the hard way.


I have Tivo Desktop installed but says can't find a Tivo device on my network so you mean I need to hook the SATA drive to my computer and Tivo Desktop will pick the drive up? Also the 1 terabyte I need the recordings off of has been formatted and all I have left is the 120 gig .bak file. The Tivo Desktop also asked me for a Media key that I can't seem to find on my Direct R10 box


----------



## unitron (Apr 28, 2006)

laddanator said:


> I have Tivo Desktop installed but says can't find a Tivo device on my network so you mean I need to hook the SATA drive to my computer and Tivo Desktop will pick the drive up? Also the 1 terabyte I need the recordings off of has been formatted and all I have left is the 120 gig .bak file. The Tivo Desktop also asked me for a Media key that I can't seem to find on my Direct R10 box


When you said S2, I thought you meant a stand alone (that is, non-satellite receiver) TiVo.

The R10 is not networkable, so it won't have a Media Access Key.

As far as I know TiVo Desktop doesn't work with DirecTivos (probably because DirecTV are a bunch of @$#%@$s)

Also, if you've formatted or otherwise written to the drive that was in the TiVo since removing it from the TiVo, all the recorded shows that were on it are almost certainly gone.

If you restored a truncated image to it and then expanded, if the new partition boundaries are exactly where the old ones were, the shows might be recoverable to the extent that you can watch them on that TiVo while that drive is in that TiVo.

Have you tried using the MFS Live v1.4 cd to try to restore that humongous backup to a different drive?

It's the most recent, and no doubt last, incarnation of MFS Tools, and might be able to handle that backup better than what you're using.


----------



## laddanator (Nov 23, 2012)

> If you restored a truncated image to it and then expanded, if the new partition boundaries are exactly where the old ones were, the shows might be recoverable to the extent that you can watch them on that TiVo while that drive is in that TiVo


Already tried this and the recordings are gone.



> Have you tried using the MFS Live v1.4 cd to try to restore that humongous backup to a different drive?


I have this CD but when I choose GUI option, it stops at a command prompt and goes no further on any computer I try to boot the disk to including an older machine so not sure why it stops. I have tried the command line option but not sure how that works.

I also have mfstool2.iso and its a command line version and boots fine and I use



> mfsrestore -r 4 -s 127 -bzpi /mnt/Tivo/Syd.bak /dev/hdc


and it starts the restore but stops right away and says failed success...weird but not sure why MFS Live v1.4 cd doesn't boot all the way into GUI? Is there a newer version of the MFS Live v1.4, like a restore edition? Aslo, thanks for your help unitron.


----------



## unitron (Apr 28, 2006)

laddanator said:


> Already tried this and the recordings are gone.
> 
> I have this CD but when I choose GUI option, it stops at a command prompt and goes no further on any computer I try to boot the disk to including an older machine so not sure why it stops. I have tried the command line option but not sure how that works.
> 
> ...


v1.4 is the most recent, and most likely last ever, version of MFS Live.

When it boots it gives you 4 options, but the ones called some graphic something do not boot to something with icons and clickable stuff.

All 4 only get to a command prompt.

I think the graphic ones merely provide better looking letters than you get by accessing the primitive character generator capability of the computer's BIOS.

mfslive.org's Full Guide has instructions on how to use it.

Main difference is in some command names, for instance, I think it's just "backup" and just "restore", although "mfsinfo" isn't reduced to just "info" and I think "mfsadd" is still the same.

What format was the partition on which you stored that 120GB backup file?


----------



## laddanator (Nov 23, 2012)

> What format was the partition on which you stored that 120GB backup file?


I have it to NTFS right now but it was on a ext4 partition and ext2 partition and nothing would allow the restore so I put it on a NTFS with Linux bootcd will mount but can't write to which is ok because I don't need to write to it but just read and restore from the NTFS partition.

On the 1.4 bootcd, at the command prompt, not sure what to type. I have read the guide but nothing I type responds at the 1.4 command prompt. I would like to join the forum but I think new members registry are closed.

UPDATE:



> Main difference is in some command names, for instance, I think it's just "backup" and just "restore", although "mfsinfo


Ok, this was helpful, I got commands that work now so I am going to boot all my stuff up and give this a whirl.


----------



## laddanator (Nov 23, 2012)

When I run the restore command from MFS 14v bootcd, I get the same error I do in Linux desktop version



> "value too large for data type"


I can install my smaller R10.bak image to the hard drive from the NTFS partition with the same restore command in 1.4 bootcd without errors but hitting a wall with the bigger file.


----------



## unitron (Apr 28, 2006)

laddanator said:


> I have it to NTFS right now but it was on a ext4 partition and ext2 partition and nothing would allow the restore so I put it on a NTFS with Linux bootcd will mount but can't write to which is ok because I don't need to write to it but just read and restore from the NTFS partition.
> 
> On the 1.4 bootcd, at the command prompt, not sure what to type. I have read the guide but nothing I type responds at the 1.4 command prompt. I would like to join the forum but I think new members registry are closed.
> 
> ...


You don't have to join the forum to read the Full Guide (although I think you do to download WinMFS-which can't work with .bak files, just the .tbk backup files it creates itself).

restore -s 250 -xpi /mnt/Tivo/Syd.bak /dev/hdc

might do it.

Of course you have to mount wherever you have that backup first, and may have to adjust /mnt/Tivo/Syd.bak accordingly.

ls -l

should show you the virtual directories that were created when the cd booted.

I usually use /dos or /tivo as the mount point.

I think

mount -t ntfs /dev/"NTFS partition" /"mountpoint"

will do it, with the stuff in quote marks replaced by whatever's the real thing in your situation.


----------



## laddanator (Nov 23, 2012)

unitron said:


> You don't have to join the forum to read the Full Guide (although I think you do to download WinMFS-which can't work with .bak files, just the .tbk backup files it creates itself).
> 
> restore -s 250 -xpi /mnt/Tivo/Syd.bak /dev/hdc
> 
> ...


Tried all that you have suggested in the last post also and still getting

"value too large for data type"

This may be undoable.


----------



## unitron (Apr 28, 2006)

laddanator said:


> Tried all that you have suggested in the last post also and still getting
> 
> "value too large for data type"
> 
> This may be undoable.


I fear you may be right about that.

We've certainly reached the limits of my expertise.

I'm a little surprised it let you make that big a backup file in the first place.


----------



## laddanator (Nov 23, 2012)

unitron said:


> I fear you may be right about that.
> 
> We've certainly reached the limits of my expertise.
> 
> I'm a little surprised it let you make that big a backup file in the first place.


Thanks for your help again, unitron. I got one more thing to try. I am going to reformat the drive I have the bak file saved to, to ext4 because when I tried to use a cat command as a pipe with restore, I am getting permission denied error and maybe it's because of the NTFS partition. Linux goes really like NTFS as much. I will report back but i do not have my hopes up for this to work.


----------



## laddanator (Nov 23, 2012)

Formatting the drive holding the .bak file to ext4 gives the same error. Will mfstools work under a 64bit Linux?


----------



## unitron (Apr 28, 2006)

laddanator said:


> Formatting the drive holding the .bak file to ext4 gives the same error. Will mfstools work under a 64bit Linux?


I refer you back to my answer about having reached the limits of my expertise.


----------



## laddanator (Nov 23, 2012)

unitron said:


> I refer you back to my answer about having reached the limits of my expertise.


I was really asking anyone who may have read this about the 64bit stuff but I can answer that question myself now. Even under 64bit Linux, I get the same error so at this point as bad as I hate too, I must give up for my own sanity.  The old lady is mad at me, lost 123gigs of her shows that she can't get back but I have been at this for 4 days now and I need a break. Thank you again, unitron for all of your help. :up:


----------



## unitron (Apr 28, 2006)

laddanator said:


> I was really asking anyone who may have read this about the 64bit stuff but I can answer that question myself now. Even under 64bit Linux, I get the same error so at this point as bad as I hate too, I must give up for my own sanity.  The old lady is mad at me, lost 123gigs of her shows that she can't get back but I have been at this for 4 days now and I need a break. Thank you again, unitron for all of your help. :up:


And unfortunately the lesson here is never back up a drive and then erase or format or re-use the drive until after you've tested the backup.

I assure you that you aren't the first to have learned that one the hard way. To that I can testify personally.


----------



## laddanator (Nov 23, 2012)

unitron said:


> I assure you that you aren't the first to have learned that one the hard way. To that I can testify personally.


And I am sure we will not be the last.  When my new box gets here, first thing, making a backup.


----------



## unitron (Apr 28, 2006)

laddanator said:


> And I am sure we will not be the last.  When my new box gets here, first thing, making a backup.


The only backup for a Premiere or other Series 4 drive is to take another drive as large or larger and "Xerox" the original to it with

dd

or

ddrescue

(that's what jmfs uses for the copy phase)

or

dd_rescue

(which, along with dd, is available on the MFS Live cd v1.4)

Due to some changes TiVo made from the previous disk structure used on the S1s through S3s, MFS Live and WinMFS cannot be used on S4s.

comer managed to figure out how to copy an S4 drive to a bigger one and add a single MFS Media partition and make the TiVo like it, and thus was born jmfs, which for some reason can also be used on the later S3 models, the HD and HD XL, though apparently not on the original S3.

The thing to do is get your Premiere set up the way you want it, including any necessary cable card pairing, and then use jmfs to copy and expand to a larger drive and put the original somewhere safe in case it's needed again for troubleshooting or if the larger drive fails catastrophically.

If newegg and/or Amazon are still selling the 2TB WD20EURS for $100, grab one. 2TB seems to be the upper limit on drive size that the S3s and S4s will accept.


----------



## laddanator (Nov 23, 2012)

Sorry, didn't mean I was getting a "new" box but a new box to me. It's a series 2 HR10-250 that I bought new in the box. I like the series 2 stuff. Easier to hack. I posted in another post about needing a 6.4a image for the HR10-250.


----------



## unitron (Apr 28, 2006)

laddanator said:


> Sorry, didn't mean I was getting a "new" box but a new box to me. It's a series 2 HR10-250 that I bought new in the box. I like the series 2 stuff. Easier to hack. I posted in another post about needing a 6.4a image for the HR10-250.


I get to talking to more than one person at a time here and sometimes the details run together.


----------



## laddanator (Nov 23, 2012)

> I get to talking to more than one person at a time here and sometimes the details run together.


That's ok, at least you do respond and I thank you for that.


----------



## JamieP (Aug 3, 2004)

laddanator said:


> I change the beginning command with mfsbackup to backup my recordings also because I am moving from a big sata drive back down to my 500 gig IDE (sata drives no matter the adapter will cause my box to freeze and the IDE will not) drive and the .bak file ended up being 120 gigs. Now when I try to restore with mfsrestore, I get an error "value too large for data type" (Using Linux Mint). Any ideas on a command that would allow the restore? Is there a pipe command to by pass this error and restore?
> 
> My command. Makes backup fine


Something along the lines

```
mfsrestore -i - {youroptions} < file.bak
```
 The "-i -" says to read from stdin, and the "< file.bak" tells the shell to pipe the contents of file.bak into the stdin of the mfsrestore process.


----------



## laddanator (Nov 23, 2012)

JamieP said:


> Something along the lines
> 
> ```
> mfsrestore -i - {youroptions} < file.bak
> ...


Thanks, JamieP and if I can get this to work, my wife will thank you too! 

Ok, using MFSlive 1.4


```
mkdir -p /mnt/Tivo

mount /dev/sdb1 /mnt/Tivo

cd /mnt/Tivo

restore -i - -s 512 -xpi - /dev/sda < Syd.bak
```
And I am no longer getting "value too large for data type" but a new error.



> Backup target is not large enough for the backup itself


Not sure why? The backup was made from a 1Terabyte drive and the file is 123gig and I am trying to restore it to a 1Terabyte drive so not sure if my restore options are correct?

Ok, figured it out removed the



> -s 512


and just used



> restore -zpi - /dev/sda < Syd.bak


.

Didn't even need the -i -

Its at 13% restore now.


----------



## laddanator (Nov 23, 2012)

I am happy to report the restore from a 123gig file worked! And this is the slimmed down command that worked for me. The pipe < is the key. I was using this but had it the wrong way > at first. Not sure if taking out the -i - did harm but as of now, she is able to watch her shows.



> mkdir -p /mnt/Tivo
> 
> mount /dev/sdb1 /mnt/Tivo
> 
> ...


Here is the kicker. She watched one show and was like "That's all I needed" and I was like "What, I have spent 6 days and was up til 3:30 a.m. working on this and all you wanted was one show!?" I was then like "Could you at least pretend to watch the other stuff also, so I don't feel like my work was for nothing?" So then I got the look of death and I retracted all my statements! 

unitron and JamieP, thank you guys sooooo much for your help. Nice to know now that you can backup to a large file and restore it.


----------



## unitron (Apr 28, 2006)

laddanator said:


> I am happy to report the restore from a 123gig file worked! And this is the slimmed down command that worked for me. The pipe < is the key. I was using this but had it the wrong way > at first. Not sure if taking out the -i - did harm but as of now, she is able to watch her shows.
> 
> Here is the kicker. She watched one show and was like "That's all I needed" and I was like "What, I have spent 6 days and was up til 3:30 a.m. working on this and all you wanted was one show!?" I was then like "Could you at least pretend to watch the other stuff also, so I don't feel like my work was for nothing?" So then I got the look of death and I retracted all my statements!
> 
> unitron and JamieP, thank you guys sooooo much for your help. Nice to know now that you can backup to a large file and restore it.


If you want her to remember something else on their she wants to watch, just go ahead and erase it. 

You might want to step away from all of it for a day or two and think of other things.


----------



## laddanator (Nov 23, 2012)

unitron said:


> If you want her to remember something else on their she wants to watch, just go ahead and erase it.
> 
> You might want to step away from all of it for a day or two and think of other things.


Yes indeed. I am moving on to prepare for the arrival of my new HR10-250 (new to me) this week. Haven't had any luck with a hit on another topic on the 6.4a image for this model. Looks like I will be buying a Instantcake image if I don't find an image before the box arrives. When I was buying Instantcake back in the day, the images were like 19.99, now they are 39.99 but sometimes that's the price you pay to play.


----------

