# Please Help with Shrink



## HoosierTivoDaddy (Sep 12, 2005)

I have done several upgrades. No problem, thanks for all the posts.

Question: What is the exact syntax to get a backup image that can be expanded again from an already expanded image?

i.e.: I have a TCD140060 that has already been upgraded to 120GB drive that is showing signs of failing again. I would like to backup the current image (with the current software ver 7.2x) and image a new 300GB drive. I understand that I will not be able to save the recordings but am not clear on this syntax.

Thank you!


----------



## funtoupgrade (Mar 15, 2005)

As far as I know this is not possible. You get one expansion only. If you can get your hands on a 60GB drive, you could stick it in temporarily until is gets 7.2 then backup and restore to the 300GB drive. You would also then have the image in case something goes wrong in the near future.


----------



## HomeUser (Jan 12, 2003)

Use the -s option in the mfsbackup 
something like mfsbackup -f9999 -6so /mnt/fat32/myTiVo60Hr.bak /dev/hda

Should create an image representing the TiVo's original drive size.


----------



## mick66 (Oct 15, 2004)

funtoupgrade said:


> As far as I know this is not possible.


It's been possible for many uears and most people do it without even knowing that they are "shrinking" the image to it's original size because it's part of the commonly used backup command strings.



> You get one expansion only. If you can get your hands on a 60GB drive, you could stick it in temporarily until...


???


----------



## Diana Collins (Aug 21, 2002)

If you are making a backup, and assuming you have mounted a DOS drive to receive the backup under /mnt/dos (insert the correct drive identifer for hdX):

```
mfsbackup -f 9999 -6so /mnt/dos/tivo.bak /dev/hdX
```
To restore that backup:

```
mfsrestore -s 127 -xzpi /mnt/dos/tivo.bak /dev/hdX
```
If you want to copy from one drive directly to another (replace hdX with the source and hdY with the new drive designations):

```
mfsbackup -f 9999 -so - /dev/hdX | mfsrestore -s 127 -xzpi - /dev/hdY
```
In all cases the key options are:
In mfsbackup....
-s ..... Shrinks the volume set. This will divorce two drive installations, and will allow the backup to be restored to a drive of the same size as the original, or larger, and be "re-expanded."

-f 9999 ..... On a Series 2, this is required to include all the background animations (on a Series 1, the default value of 2000 is sufficient)

In mfsrestore....
-x ..... Expands the MFS volume space to fill the drive

-z ..... Zeros out partions not backed up.


----------



## HoosierTivoDaddy (Sep 12, 2005)

Thank you! As Mick66 mentioned, I have been doing it all this time an not knowing it. I thought all this time that the -6so option was used to compress (the -s) the backup and the "6" set the compression ratio. Thank you for the clarification!


----------



## HoosierTivoDaddy (Sep 12, 2005)

Finally getting ready to do my upgrade... from a 120GB to 200GB and I will have to use the shrink command.

Q: Will the -s command preserve my season passes and settings? 
(I know recordings will be gone).

Thanks!


----------



## thepackfan (May 21, 2003)

No, basically a new install.


----------



## blindlemon (May 12, 2002)

thepackfan said:


> No, basically a new install.


Not true. The -s option will drop your recordings but everything else will be preserved.

If -s fails to shrink your backup properly then you may need to use my DeleteAll script (assuming you have network access) to fully delete all recordings before re-attempting the backup.


----------



## HoosierTivoDaddy (Sep 12, 2005)

Would it be just as easy to delete all recordings (preserving settings) before I remove the drive?


----------



## HomeUser (Jan 12, 2003)

Yes, you can delete everything before the transfer and that is probably a good idea.

blindlemon, The -s shrinks the backup by removing the empty partitions. It is the f nnnn or -l n that removes the recordings. 


> -s
> Shrink the MFS volume A.K.A. "Divorce" the drive. Basically, after collecting a list of streams to backup, this will go through and see if any of the partitions don't have any data being backed up. If it finds this the case, it will remove any superfluous partitions from the description. (Only works if the ones not being backed up are at the end of the list. Ones in the middle aren't chopped off.)


 reference:New MFS Tools features, and a question


----------

