View Full Version : Network backup with DD and Netcat
scoob8000
12-24-2004, 08:57 PM
I'm a linux geek who usually uses DD, gzip, and netcat to do my backups..
I want to do a full disk image backup but I'm tired of pulling my drive.
I've DD'ed running systems before, but not a Tivo. Will this yield a usable backup (if I ever need it)?
I considered the constant writing to the drive... What if I set to channel 99 and make sure nothing is scheduled to record. Or better yet, put Tivo in standby. (I tried it and can still telnet in and access the disk.)
Sorry if this is a repost, all I could find was a similar post that went unanswered.
Jamie
12-24-2004, 09:38 PM
I'm a linux geek who usually uses DD, gzip, and netcat to do my backups..
I want to do a full disk image backup but I'm tired of pulling my drive.
I've DD'ed running systems before, but not a Tivo. Will this yield a usable backup (if I ever need it)?
I considered the constant writing to the drive... What if I set to channel 99 and make sure nothing is scheduled to record. Or better yet, put Tivo in standby. (I tried it and can still telnet in and access the disk.)
Sorry if this is a repost, all I could find was a similar post that went unanswered.I would suggest you boot to a bare bash without any tivo software running so you know MFS is quiescent. A dd copy is going to copy everything (e.g. even unallocated space), and it's going to take quit a while. gzip is going to be very slow running on a tivo and the video streams are unlikely to compress much if any. I'd be surprised if you could do better than 4MB/sec, which would be something like 5min/GB. So an 80GB drive might take 7 hours or so. And that's optimistic.
scoob8000
12-24-2004, 10:16 PM
I would suggest you boot to a bare bash without any tivo software running so you know MFS is quiescent.
How would I go about that on a tivo? Or can I just kill myworld (if it doesnt respawn)..
I'm already trying it.. I'm just dd if=/dev/hda and piping it to netcat, then gziping on my PC.. It's been running for about 26 hours.. lol
I think I'm just going to pull the drive.. I want a true image to save for a rainy day..
Jamie
12-25-2004, 02:33 AM
How would I go about that on a tivo? Or can I just kill myworld (if it doesnt respawn)..
I'm already trying it.. I'm just dd if=/dev/hda and piping it to netcat, then gziping on my PC.. It's been running for about 26 hours.. lol
I think I'm just going to pull the drive.. I want a true image to save for a rainy day..
Yes, pulling the drive and running mfsbackup is clearly the easiest and safest thing to do.
I have a minimal rc.sysinit I use that just brings up bash on the serial console. From there I can start networking, etc when I want to do work on a quiescent machine.
scoob8000
12-26-2004, 10:50 PM
Yes, pulling the drive and running mfsbackup is clearly the easiest and safest thing to do.
Is it safe to assume mfsbackup will backup will include my /var/hacks directory and killhdinitrd'ed kernel?
Guess I don't really need to save my recordings.
Jamie
12-26-2004, 11:00 PM
Is it safe to assume mfsbackup will backup will include my /var/hacks directory and killhdinitrd'ed kernel?
Guess I don't really need to save my recordings.Yes, mfsbackup will backup /var (hda9) and the active root partition and kernel. It won't backup the alternative root, and it doesn't deal with unusual monte partition layouts (e.g. generated by tivoscripts). Backup with -a to save everything, including all recordings. If you want to make a smaller backup without recordings, -f and -l allow discarding things, but be careful. It's common to discard too much and lose background animations too.
idoco
12-27-2004, 06:22 PM
Here is a link to a thread on using MFSTools on a Tivo while it is running. The Tivo version of MFSTools was compiled by RonnyThunder.
The image/backup generated could either be piped to a PC using netcat or saved on the Tivo (then FTP the image to the PC side).
Unfortunately I don't see a copy of the Tivo version of MFSTools in the file section. The link to the version in the thread also appears to have been removed.
Idoco
http://www.dealdatabase.com/forum/showthread.php?t=33080&page=5
http://www.dealdatabase.com/forum/showthread.php?p=170803
scoob8000
12-27-2004, 10:15 PM
Yes, mfsbackup will backup /var (hda9) and the active root partition and kernel. It won't backup the alternative root, and it doesn't deal with unusual monte partition layouts (e.g. generated by tivoscripts).
I used params –6so as from Jenkins' original guide. I thought it was odd my backup was only 115MB though.. A gzip -9 of my /var/hacks directory is 23MB alone..
Sound right?
Intresting, I know I saw a reply about a version of mfsbackup compiled to run on tivo, post deleted it looks like.. If this is a forum no no I'll shut up now.. :)
Jamie
12-27-2004, 10:58 PM
I used params –6so as from Jenkins' original guide. I thought it was odd my backup was only 115MB though.. A gzip -9 of my /var/hacks directory is 23MB alone..
Sound right?
Sounds likely to small. If you didn't specify -a, it certainly didn't back up your recordings, and it probably lost the background animations. The default -f is 2000, IIRC. This drops all streams with fsid above 2000. This is way too low to preserve everything you want.Intresting, I know I saw a reply about a version of mfsbackup compiled to run on tivo, post deleted it looks like.. If this is a forum no no I'll shut up now.. :)No reason for it to be a no-no, but I think it is a bad idea. Running the backup on the tivo is very slow, and you don't want to do it when the tivo software is running since you'd be capturing an inconsistent MFS state. If you really want to try, it's not hard to check it it out of cvs on sourceforge and cross compile it for mips.
Jeff D
05-23-2005, 05:26 PM
Could someone post a command line that would get the work done?
I'm trying to take a virgin HD10-250 drive and back it up before powering up.
I know that I want to run dd and gzip, but I don't know anything about netcat.
something like:
dd if=/dev/hdc bs=2M | gzip | split -b 1024m - backup.img.gz
I think this will get me 1GB chunks compressed, but I'm still a linux noob and there's no netcat in my plan.
The other question I have is with respect to .par file, should I use par files in case some any files on DVD can't be read?
Thanks.
Jeff D
05-23-2005, 09:19 PM
Ok, so split doesn't seem to exist... or at least I can't find it. What's the correct way to create segments?
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.