[mythtv-users] xfsrestore backup woes

Will Dormann wdormann at gmail.com
Mon Nov 28 22:34:55 UTC 2016


On 11/27/16 8:26 PM, Will Dormann wrote:
> I use xfsdump to back up the system before any changes.   After
> restoring from backup I was greeted with the first-time MythTV setup
> screen.  :(
> 
> After a little bit of troubleshooting, I realized that my
> /etc/mythtv/config.xml file was missing!   Increasing verbosity in
> xfsrestore and doing an interactive restore, I see:


Just a follow-up after some discussions with the XFS folks:

TL;DR: Don't rely on xfsdump to back up everything.


There are things that can prevent xfsdump from successfully backing up a
file on a live filesystem.  For example, changes to the file that happen
during the backup *may* cause said file to not properly be stored in the
xfsdump backup.  The unfortunate situation there is that you can have a
backup where all of the files *seem* to be there, at least according to
the file inventory in the dump, but when you go to restore them they
won't actually be there.   Which IMO is the most catastrophic way that a
backup can fail (silently on both backup and restore).

My hope was that a xfsdump backup should be enough for a bare-metal
restore, and that mythconverg_backup.pl would be able to ensure database
consistency.  But at least this time around I was proven wrong.

The guess was that /etc/mythtv/config.xml was perhaps written to around
backup time, but I don't really buy it.  I don't think that file is
written to after mythtv install time, right?


Anyway, regardless of the reason, I did confirm that the file was
missing from two different level-0 xfsdump backups.  And since I've
manually copied another backup of /etc/mythtv/config.xml to get the
system back up and running again, I can't really investigate further as
to why the file wasn't being backed up.  The problematic file doesn't
exist anymore.   It apparently only lives as metadata in my mysqldump
backup or two.


Yes, backups are only good if the backup/restore routine has been
tested.  And I have indeed performed bare-metal restores using the
xfsdump/mythconverg_backup combo.  However, given this recent silent
failure of a single file, I'll likely go back to offline (via rebooting
the system to a live CD to image the disk) backups for trusted
bare-metal-capable backups and restores.   And
xfsdump/mythconverg_backup for convenience.


I guess I've gotten spoiled with ZFS...


-WD


More information about the mythtv-users mailing list