MediaPortal Forums HTPC/MediaCenter
Old 2008-04-29, 02:56   #1 (permalink)
Portal Member
 
Join Date: Mar 2008
Posts: 67
Thanks: 2
Thanked 0 Times in 0 Posts

Country:

My System

Default Database Backup & Restore

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.
kingnubian is offline   Reply With Quote
Old 2008-04-29, 17:43   #2 (permalink)
Super Moderator
 
Join Date: Feb 2005
Location: Melbourne
Posts: 1,992
Thanks: 82
Thanked 28 Times in 28 Posts

Country:

My System

Send a message via ICQ to Marcusb
Default

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.
Attached Files
File Type: txt MP_database_backup.txt (1.8 KB, 60 views)
Marcusb is offline   Reply With Quote
Old 2008-04-30, 09:27   #3 (permalink)
Portal Member
 
Join Date: Mar 2007
Age: 31
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts


Default

I think it's better to use the intagrated backup system of SQL server or MySQL. It's not a priority for me.
DranDane is offline   Reply With Quote
Old 2008-04-30, 12:02   #4 (permalink)
Super Moderator
 
Join Date: Feb 2005
Location: Melbourne
Posts: 1,992
Thanks: 82
Thanked 28 Times in 28 Posts

Country:

My System

Send a message via ICQ to Marcusb
Default

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.
Marcusb is offline   Reply With Quote
Old 2008-04-30, 18:40   #5 (permalink)
MP Donator
 
MoPhat's Avatar
 
Join Date: Jun 2007
Location: Berg
Age: 36
Posts: 816
Thanks: 10
Thanked 100 Times in 18 Posts

Country:

My System

Default

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

greetz
MoPhat
MoPhat is offline   Reply With Quote
Reply

Bookmarks

Tags
backup, restore

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup Mediaportal -> Restore Mediaportal other pc jin General Support 2 2008-04-05 16:48
Backup Mediaportal -> Restore Mediaportal other pc jin Installation, configuration support 0 2008-04-04 14:12
Creat&Backup&restore audio playlist boombastic Listen Music 1 2007-12-24 18:37


All times are GMT +1. The time now is 13:38.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden