Database Backup & Restore (1 Viewer)

kingnubian

Portal Pro
March 18, 2008
67
0
Home Country
Canada Canada
I would love a simple database backup & restore tool which can backup individual or all databases either through a scheduler or manually. This can be done while in MP via the remote control.
 

Marcusb

Retired Team Member
  • Premium Supporter
  • February 16, 2005
    1,994
    29
    Melbourne
    OK, I made a batch file that should back up the MP database using an OSQL command line query.
    Just set it to run via a sceduled task once a day and it will back up the database and manage the last five days worth of backups.

    It's pretty quick and dirty and needs some setting up.
    I'm not home at the moment, so can't test it, but in theory it should work.
    I'll fly home tomorrow so should be able to test it myself and post the matching restore files too (home is a long way away).

    Basically just open the attsached file and make sure you change the file location variables to match what you have and create any required sub folders.
    Then change the file name extension from txt to bat (since the forum wont allow me to upload batch files.

    I'll be out of contact for the next day or two, then can make any tweaks as needed. I tested it with a different SQL express database that I have here and it works well, so any issues may just be with the database name, password or file structure, since I'm going from memory.

    Also, I know I should use "IfExist" before copying or deleting files, but like I said, it's quick and dirty :)

    Cheers,
    Marcus.
     

    Attachments

    • MP_database_backup.txt
      30.7 KB

    Marcusb

    Retired Team Member
  • Premium Supporter
  • February 16, 2005
    1,994
    29
    Melbourne
    the thing is that SQL express doesn't have any method to automate backups.
    if you want a nightly back up or something similar then you need some type of script to run as a sceduled task.
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    Hi, you can take the one BAT file and the other SQL file the enable scheduled SQL database backups.

    Just change the path, username, password and the pc name on both files.

    After this you can add backup.bat to the windows scheduler to auomate backups :D

    greetz
    MoPhat
     

    Users who are viewing this thread

    Similar threads

    If you’re planning to submit a pull request, let’s go through the list of issues and their solutions. I or someone from the team will create a Jira ticket, and for each ticket, you’ll make the changes and submit a pull request. This will be transparent and straightforward.
    If you’re planning to submit a pull request, let’s go through the list of issues and their solutions. I or someone from the team...
    I'm very glad to see that mediaportal 1 is on github, where ordinary devs with github accounts can make contributions. Please can...
    Replies
    7
    Views
    1K
    Hi. I was probably being a bit fast and loose with my terminology. I meant "somewhere within the files that MP2 uses in its database". Anyway, I found a way to do this which was far from automated but relatively low effort. I found what looked like all the images (CD covers, DVD covers, backgrounds etc all lumped together in...
    Hi. I was probably being a bit fast and loose with my terminology. I meant "somewhere within the files that MP2 uses in its...
    I am in the process of setting up a legacy media player (Mede8er) which I happened to have laying around into my home cinema setup...
    Replies
    2
    Views
    471
    4.5 is really old. I'm not sure 4.5.5 even is a version that actually existed. You should be able to install .NET Framework 4.8.0 on Windows 7 SP1
    4.5 is really old. I'm not sure 4.5.5 even is a version that actually existed. You should be able to install .NET Framework 4.8.0...
    My TV PC is more a cast-off on older hardware (a 'Quiet PC' i5 4690, 16GB ram, 2xSSD 1xHDD, system graphics), mainly as a cheap way...
    Replies
    5
    Views
    2K
    Fixed, I think. Certainly the vintage MP2 installer that I was using no longer installs the LAV filters. I can only assume that these were never part of the install package itself, but rather downloaded during the install, and that link no longer exists. Shame that the installer doesn't indicate this. Last time when I installed the...
    Fixed, I think. Certainly the vintage MP2 installer that I was using no longer installs the LAV filters. I can only assume that...
    Hi all, I've recently retired my MP2 setup for my main HTPC and gone back to separates, but I wanted to retain the ability to play...
    Replies
    4
    Views
    398
    I don't know about MP2 but as you said you tried MP1 too, how is the MP music config ? MP(1) will only use LAV if you select "Internal DirectShow player" as music output, but then you lose gapless playback. If you you don't have multichannel music you can choose WASAPI as the output and set the number of speakers to stereo. I have...
    I don't know about MP2 but as you said you tried MP1 too, how is the MP music config ? MP(1) will only use LAV if you select...
    Not sure if this a a bug/config/settings problem. I am running a media portal 2.5 server with 2.41 client but it seems I get the...
    Replies
    1
    Views
    839
    Top Bottom