MP 2.1 Backup & Restore

Discussion in 'General' started by Lehmden, December 29, 2016.

Thread Status:
Not open for further replies.
  1. Lehmden
    • Premium Supporter

    Lehmden Retired Team Member

    Joined:
    December 17, 2010
    Messages:
    11,898
    Likes Received:
    2,151
    Gender:
    Male
    Location:
    Lehmden
    Ratings:
    +3,628 / 28
    Home Country:
    Germany Germany
    Show System Specs
    Hi.
    As the release of the first MP 2.1 version ( MP 2.1 Pre- Release) will most likely be in the next 48 hours it is time for a new tool. As Expected MP2-Edit did not work any longer with MP 2.1. MP 2.1 Backup & Restore did not have all options from MP2-Edit but this never was the plan. But it can make fully automated backups of your MP 2.1 databases and will help you migrating from MP 1.x or MP 2.0 to MP 2.1.
    There is an German post also, if you prefer to read in German.
    MP 2.1 Backup & Restore

    The tool is available in two languages, English (default) and German and can be translated to any other language easily. It comes with an average installer. It should be installed on the same system where you planed to install or have installed the MP2 server. As it needs to alter files in system folders (ProgramData) it needs admin rights. And the taskplaner settings also needs admin rights, at least on Windows 10. The program asks for admin credentials on startup, if it is not running under an admin account already. Sadly this can not be avoided. You also can install the tool on a different system, but only to save the watched flags from an "old" MP 1.x installation. All MP 2.x related functions are only working if the tool is running on the same system than the MP2 server.

    Configuration:
    After the installation you should first set the GUI language (if needed) and have a look at the path settings.
    Zwischenablage-6.png



    If you have a default installation of MP you most likely don't need to change anything. Only the storage for backups probably should be adjusted. Any changes here require the tool to be restarted to be used.

    Backup Mangement:
    Zwischenablage-7.png
    Here you can restore or delete existing backups or create a new one manually. Backups are possible for the media library and both TV engines, TVE 3.0 (default, stable) and TVE 3.5 (Alpha version). But only one TV engine can be existing at the same time. If you restore an existing backup, the MP 2.1 server needs to be stopped for a short time. As this will interrupt media playback, Live-TV and running recordings there is a requester asking you, if it's save to stop the server now. As soon as the backup is restored the MP2.1 server will be started again.

    Setup Schedules:
    Zwischenablage-8.png

    Her you can schedule an automated and invisible backup of your database( s ). You can set the day ( s ) and the time when a backup should run and select which databases should be backed up. The time has to be entered in 24 hours format. You can set the number of "old" backups to keep. I would suggest to limit this to at least 2 backups, just to be on the safe side, if you have done some bad things right after the backup was running. But you may want to keep more than two. this is completely up to you. You can delete any existing schedules if you don't want to use the automatic function any longer and you can set a new schedule with the recent settings. Any older schedules are removed automatically if a new schedule is created, so you don't need to do this by hand... The automated backup did not disturb the MP2.1 server at all as special SQLite functions for backup purposes are used.

    Watched Flags Tools:

    Zwischenablage-9.png

    Zwischenablage-10.png

    As MP 2.1 has very complex relations between series/seasons/episodes and movies/moviesets it is not too easy to save and restore watched flags from/to MP 2.1. For this the MP 2.1 database first need to be scanned. During the scan all relevant data is transferred to an own database to perform all needed actions before storing them back to the MP 2.1 database. This scan has to be done for every watched flags tool. You can backup existing watched flags from MP 1.x or MP 2.0 installations without scanning the MP 2.1 database. This can and should be done before you install MP 2.1. When you have installed MP 2.1 and have imported your media sources you should scan the database.
    Zwischenablage-11.png

    The scan can last some minutes, depending on the size of your media library.

    Zwischenablage-12.png

    After it is done the disabled options are activated so you can backup or restore the watched flags from/to MP 2.1 Before a restore it is possible to reset all watched flags in the MP 2.1 database. This option normally is not needed but if you want to, you can reset the flags.
    When the flags are written into the MP 2.1 database the MP 2.1 server also has to be stopped shortly. Again there will be a request for safety reasons.

    Recent version: 0.1.1.15
     

    Attached Files:

    Last edited: April 20, 2017
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. JSchuricht
    • Premium Supporter

    JSchuricht MP Donator

    Joined:
    January 13, 2009
    Messages:
    154
    Likes Received:
    12
    Gender:
    Male
    Occupation:
    Chemical Mechanical Planarization
    Location:
    Arizona
    Ratings:
    +23 / 0
    Home Country:
    United States of America United States of America
    Show System Specs
    Well, series watch flag import seems to have worked but movies is a no go for me. The server is win 10 and MP 2.1 backup is being run as admin. The movie.watched file in the export director is full of imdb tt numbers, 1605 lines in case there is a limit there. After doing a scan then restore with or without reset watch flags checked all movies are still showing up as unwatched. With debug turned on I get an error during scan now "Line 15593 Error: Array variable has incorrect number of subscripts or subscript dimension range exceeded. I included a screenshot of the error and all the logs I could find, hopefully it's enough to give some incite in to this issue.
     

    Attached Files:

  4. JSchuricht
    • Premium Supporter

    JSchuricht MP Donator

    Joined:
    January 13, 2009
    Messages:
    154
    Likes Received:
    12
    Gender:
    Male
    Occupation:
    Chemical Mechanical Planarization
    Location:
    Arizona
    Ratings:
    +23 / 0
    Home Country:
    United States of America United States of America
    Show System Specs
    I just took a closer look at series and most of the watched ones are marked as unwatched. There are just a handful of random episodes in series marked watched.

    I have been poking around trying to figure out what's going on and interestingly in the M_MEDIAITEM table of Datastore.s3db there are 1776 items with a playcount of 1. I don't know if that's the right area but the title makes me think something updated watch flags.

    I just tried setting a movie to watched and M_MEDIAITEM does update playcount to 1, not sure why MP2.1 isn't recognizing the others with playcount of 1.

    Tried changing the LASTPLAYED column from NULL to an actual value copied from the movie set to played in MP2.1 and it didn't make a difference. Still looking for other stuff that is different between the imported watched flag movies and the one set to watched in MP2.1.

    And you can ignore everything above but it may still be helpful to someone. I just checked my other clients and it appears that watched flags for movies are client specific now where they are only flagged as watched on the client that played them and series are just weird with some watched flags set on multiple clients and some just on the one that played the show.
     
    Last edited: December 30, 2016
  5. Lehmden
    • Premium Supporter

    Lehmden Retired Team Member

    Joined:
    December 17, 2010
    Messages:
    11,898
    Likes Received:
    2,151
    Gender:
    Male
    Location:
    Lehmden
    Ratings:
    +3,628 / 28
    Home Country:
    Germany Germany
    Show System Specs
    Hi.
    I found some strange things in the logs.
    I never have seen such. This can not work for sure but I have no clue what's this all about. There seems to be some Moviesets with non printable names in your collection or at least in your MP 2.1 database...

    I hear this for the first time. As far as I know (and I'm part of the development team) the "per user" option is not implemented, not even started now. During my tests with various MP 2.1 internal test versions I always used a singleseat system. Need to check this at first.
     
  6. Lehmden
    • Premium Supporter

    Lehmden Retired Team Member

    Joined:
    December 17, 2010
    Messages:
    11,898
    Likes Received:
    2,151
    Gender:
    Male
    Location:
    Lehmden
    Ratings:
    +3,628 / 28
    Home Country:
    Germany Germany
    Show System Specs
    Hi.
    I've tested it by installing a client on my working machine. The watched flags are not client specific here. They show up on this new client that never was playing anything before. But what is client specific are the played percentages. Everything I've marked as watched on a different client is marked as watched here too, but the play percentage is at 0% also it should be 100%.
    Zwischenablage-1.png
    This seems to be a bug in the Pre Release. I will report this to our devs.
     
  7. Lehmden
    • Premium Supporter

    Lehmden Retired Team Member

    Joined:
    December 17, 2010
    Messages:
    11,898
    Likes Received:
    2,151
    Gender:
    Male
    Location:
    Lehmden
    Ratings:
    +3,628 / 28
    Home Country:
    Germany Germany
    Show System Specs
    Hi.
    Just to compare, here is the same screen shown on my main HTPC:
    Zwischenablage-2.png

    I think you see the difference. Need to wait for an answer from one of our devs before I can tell more...
     
  8. breese
    • Premium Supporter

    breese Retired Team Member

    Joined:
    July 11, 2011
    Messages:
    3,903
    Likes Received:
    325
    Gender:
    Male
    Occupation:
    Sr. Systems Engineer
    Location:
    Arlington Heights, Illinois
    Ratings:
    +768 / 0
    Home Country:
    United States of America United States of America
    Show System Specs
    I am using 0.1.1.13
    Should the restore remember all my client settings?
    When I do a new install of MP2.1 and run the restore, none of my settings are restored...
     
  9. Lehmden
    • Premium Supporter

    Lehmden Retired Team Member

    Joined:
    December 17, 2010
    Messages:
    11,898
    Likes Received:
    2,151
    Gender:
    Male
    Location:
    Lehmden
    Ratings:
    +3,628 / 28
    Home Country:
    Germany Germany
    Show System Specs
    Hi.
    No, this is a server only tool. The client settings are stored in various XML files on every client machine separately. For this they can be saved with explorer easily if needed. Simply copy the folder "c:\ProgramData\Team MediaPortal\MP2-Client\Config\" aside and back again later and you have all client settings preserved...
     
    • Thank You! Thank You! x 1
  10. Lehmden
    • Premium Supporter

    Lehmden Retired Team Member

    Joined:
    December 17, 2010
    Messages:
    11,898
    Likes Received:
    2,151
    Gender:
    Male
    Location:
    Lehmden
    Ratings:
    +3,628 / 28
    Home Country:
    Germany Germany
    Show System Specs
    Hi
    New Version 0.1.1.15 in first Post.
    The new version has improved schedules settings. With "Wake system for backup" you can set an option to wake the MP2 Server system from standby/hibernate for running the backup. "Enable delayed start" will run the backup as soon as the system is available after a run was missed for whatever reason. And with "Run only on idle" ticked the backup process only runs when the server is not used by other apps...
    Zwischenablage-2.jpg
     
    • Like Like x 1
  11. ge2301
    • Team MediaPortal

    ge2301 MP2 Design

    Joined:
    January 11, 2014
    Messages:
    6,279
    Likes Received:
    1,576
    Gender:
    Male
    Occupation:
    Automotive Industry
    Location:
    Stuttgart
    Ratings:
    +2,371 / 2
    Home Country:
    Germany Germany
    @Lehmden,
    I guess current version is also working for MP2.1.1, MP2.1.2 and MP2.1.3.
    Because the DB will change once again with MP2.2, most people using an earlier version will need an updated version of your tool.
    Are you already working on that? The user management will be also part of the DB, so you would also need to consider that I think.
     
Loading...
Thread Status:
Not open for further replies.

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!