MP 2.1 Backup & Restore (1 Viewer)

Status
Not open for further replies.

Lehmden

Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,085
    3,685
    Lehmden
    Germany Germany
    Country flag
    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
     

    Attachments

    Last edited:

    JSchuricht

    Test Group
  • Team MediaPortal
  • January 13, 2009
    237
    43
    Arizona
    United States of America United States of America
    Country flag
    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.
     

    Attachments

    JSchuricht

    Test Group
  • Team MediaPortal
  • January 13, 2009
    237
    43
    Arizona
    United States of America United States of America
    Country flag
    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:

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,085
    3,685
    Lehmden
    Germany Germany
    Country flag
    Hi.
    I found some strange things in the logs.
    12/29/2016 9:02:50 PM - Debug - $movieset_result[965][1] = Zoolander Collection
    12/29/2016 9:02:50 PM - Debug - $movieset_result[966][1] = Zoolander Collection
    12/29/2016 9:02:50 PM - Debug - $movieset_result[967][1] = ??????? ??????
    12/29/2016 9:02:50 PM - Debug - $movieset_result[968][1] = ??????? ??????
    12/29/2016 9:02:50 PM - Debug - $movieset_result[969][1] = ?????? ????(??????????)
    12/29/2016 9:02:50 PM - Debug - $movieset_result[970][1] = ?????? ????(??????????)
    12/29/2016 9:02:50 PM - Debug - $movieset_result[971][1] = ??????(??)
    12/29/2016 9:02:50 PM - Debug - $movieset_result[972][1] = ??????(??)
    12/29/2016 9:02:50 PM - Debug - $movieset_result[973][1] = ??????
    12/29/2016 9:02:51 PM - Debug - $movieset_result[974][1] = ??????
    12/29/2016 9:02:51 PM - Debug - $movieset_result[975][1] = ???(??)
    12/29/2016 9:02:51 PM - Debug - $movieset_result[976][1] = ???(??)
    12/29/2016 9:02:51 PM - Debug - $movieset_result[977][1] = ??????????(??)
    12/29/2016 9:02:51 PM - Debug - $movieset_result[978][1] = ??????????(??)
    12/29/2016 9:02:51 PM - Debug - $movieset_result[979][1] = ??(??)
    12/29/2016 9:02:51 PM - Debug - $movieset_result[980][1] = ??(??)
    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...

    it appears that watched flags for movies are client specific now
    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.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,085
    3,685
    Lehmden
    Germany Germany
    Country flag
    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.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,085
    3,685
    Lehmden
    Germany Germany
    Country flag
    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...
     

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,903
    769
    61
    Arlington Heights, Illinois
    United States of America United States of America
    Country flag
    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...
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,085
    3,685
    Lehmden
    Germany Germany
    Country flag
    Hi.
    Should the restore remember all my client settings?
    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...
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,085
    3,685
    Lehmden
    Germany Germany
    Country flag
    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
     

    ge2301

    MP2 Design
  • Team MediaPortal
  • January 11, 2014
    6,622
    2,387
    Stuttgart
    Germany Germany
    Country flag
    @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.
     
    Status
    Not open for further replies.

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom