[other] - Add database safety

Discussion in 'Improvement Suggestions' started by Requiem, December 29, 2013.

  1. Requiem
    • Premium Supporter

    Requiem MP Donator

    Joined:
    January 1, 2012
    Messages:
    585
    Likes Received:
    80
    Gender:
    Male
    Ratings:
    +174 / 2
    Home Country:
    Germany Germany
    Show System Specs
    Hi,

    first, let me say, I am just an experienced user but not a pprogrammer in any way, so I don't know if my suggestion is a good idea or not.

    I have been using MePo for a good while now and I like it very much, especially it's expandability and customizability. But it has happened to me several times now that unexpected errors occured - the most severe due to corruption of any of the databases. So my idea was to add a kind of database security by adding a backup of all database files which should be updated after either a) after a verified successful modification or b) after a specified time period.

    a) Would be nice, but hard to achieve, as every addon author would need to use these routines,
    b) could make backups on every startup of MePo into a subfolder (add date/timestamp to filename) and you could set in config e.g. "max 20 copies" or "max x mb disk space" before the old entries become deleted.



    So, if a database gets corrupted, you could simply go back to an older, hopefully not yet corrupted version.
    I have saved myself from reinstalling or at least rebuildiung databases several times by my daily incremental backups, but I suppose not everyone does these.
     
    • Agree Agree x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. regeszter
    • Team MediaPortal

    regeszter Retired Team Member

    Joined:
    October 29, 2005
    Messages:
    5,335
    Likes Received:
    2,863
    Ratings:
    +5,152 / 18
    Home Country:
    Hungary Hungary
    Hi,

    are you talking about the my videos/pictures/music and folder databases or tv databases or anyting else?
     
  4. seco
    • Team MediaPortal

    seco Development Group

    Joined:
    August 7, 2007
    Messages:
    1,579
    Likes Received:
    897
    Gender:
    Male
    Ratings:
    +1,234 / 4
    Home Country:
    Finland Finland
    Show System Specs
    In general databases should not corrupt that often so backing up all the time just because of this is not a real solution. Funny thing is that for example SQLite says that it is "highly resistant to corruption". Like regeszter suggested it would be nice to know what DBs you are having problems with.
     
  5. Requiem
    • Premium Supporter

    Requiem MP Donator

    Joined:
    January 1, 2012
    Messages:
    585
    Likes Received:
    80
    Gender:
    Male
    Ratings:
    +174 / 2
    Home Country:
    Germany Germany
    Show System Specs
    Yes, basically about all database files in \ProgramData\Team Mediaportal\Mediaportal\Database (and corresponding folder for the TV server part).
    My experience was that this seems to be quite vulnerable for database corruptions, this leading to crashes of MePo. I've experienced this several times, sometimes due to a HTPC reset/freeze at the wrong moment, due to a buggy plugin, sometimes du to a MePo crash to other causes, sometimes without an explanation for that. Restoring the databases almost always restored full functionality, but if you have no backups, you're screwed...

    I agree on the "should not" part, but my experience is another, especially when you customize many things with plugins which come with more databases etc.
     
  6. seco
    • Team MediaPortal

    seco Development Group

    Joined:
    August 7, 2007
    Messages:
    1,579
    Likes Received:
    897
    Gender:
    Male
    Ratings:
    +1,234 / 4
    Home Country:
    Finland Finland
    Show System Specs
    TV Server part is a bit different since it uses "real" databases like MySQL/MSSQL Server and especially now that MySQL is using InnoDB engine as default it should be more robust.

    I'm not sure why SQLite corrupts so easily, I know that there are threads here in the forums almost every week where someone has messed up DB..
     
  7. Requiem
    • Premium Supporter

    Requiem MP Donator

    Joined:
    January 1, 2012
    Messages:
    585
    Likes Received:
    80
    Gender:
    Male
    Ratings:
    +174 / 2
    Home Country:
    Germany Germany
    Show System Specs
    Okay, then for the client part. Indeed, never had problems with TV server part. But as you said, there are several threads about corrupted databases (either MePo itself or plugin related, which does not really matter if the result is MePo crashing). So, especially for the not-so-experienced user, maybe some kind of backup- and restore functionality would be nice. Or, if achievable, a more stable database.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!