[mythtv-users] image of mythtv system
Leighton Brough
brough at baremetalsoft.com
Sat Oct 21 08:12:56 UTC 2006
Bilge Tutak wrote:
> Hi,
> I want to make an exact image of my mythtv box and put it on a dvd. If
> something
> goes wrong, I do not want to install everything from the beginning again.
> First, how do you make an image from a system? (if possible, I think
> it is possible :))
> Assuming, I made the image and later successfully, re-deployed the
> image. Again,
> assuming no hardware change, will it work as before?
As others have suggested, the great thing about Linux here is that you
can do pretty much anything you care to dream up.
There's at tool called mondo rescue that's been mentioned on the list
before that can burn you a backup DVD that you can reinstall an exact
image with. I haven't tried it, but I'll probably give it a go if I get
motivated to create backup disc to be able to recover painlessly from a
HDD crash.
My strategy is to have two identical partitions on my system which
contain everything but the mythtv media files. I've got two entries in
/boot/grub/menu.lst: one for each. The default boot option boots the
kernel image on the first partition, and mounts the second one as
/backup. The backup boot menu option boots the image on the second
partition, and mounts the first partition as /primary. I've then got two
rsync based scripts: one to update the copy of the first partition on
the second (i.e. backup), and the other to update the first partition,
from the second (i.e. restore).
Before I do an update, make any substantial system changes etc, I run my
backup script. If after a while I realise something has broken, I boot
the backup image and restore. Similarly, if I make a config change and
something breaks, I can trivially have a look in /backup to see how it
was before, restore a config file or whatever.
I don't bother backing up the recorded TV files, since it's not the end
of the world if I lose these, and it's many gigs of data. This means it
is possible for the mythtv database and video files to be out of sync
after a restore. A recent thread discussed how to re-syncronise these:
http://www.gossamer-threads.com/lists/mythtv/users/230248?search_string=cleanup%20script;#230248
When I did the first build of my mythbox based on Debian, I didn't
realise how important it is to stay near the bleeding edge in terms
installed software versions, at least for the kind of system I want. So
I suffered a fair amount of pain to get sufficiently up-to-date software
installed to enable the features I wanted. I'm now using ArchLinux which
I've found a much better fit, since this distro aims to have packages
follow the latest releases of everything. However this does mean that
they're not always as stable as they would be with other distros, such
as Debian. Consequently a simple and robust update and rollback system
been essential, since updates are often, but not always as change for
the better. And anyway, I want to be able to spend an evening
experimenting with a new feature or config, and be able to trivially
roll back if it doesn't work, without leaving my TV broken.
Incidentally, since there's a suitable ArchLinux package for every
software dependency I've needed for MythTV (which is the only thing I
build from source), the entire install and setup procedure is actually
pretty simple. I've kept sufficient notes to be able to redo all this
with ease, and I keep copies of any complex config files or scripts I've
written elsewhere, so I'm not stressed by the idea of having to rebuild
from scratch, if my HDD fails.
Leighton
More information about the mythtv-users
mailing list