HOW-TO:Share libraries using MySQL/Advanced notes

advancedsettings.xml
For a full listing of the advancedsettings.xml parameters, see advancedsettings.xml

Symlink alternative to Path substitution
If your operating system supports symlinks, you can instead use a symlink which does not require editing the advancedsettings.xml. Here's how:

Assuming you have all of the share permissions correct, you can just REPLACE your thumbnails folder on all of the machines except the HOST machine with a symlink.

Here is an example for XBMC users on Windows 7:

Open an elevated command prompt (run as administrator) and then type in:

CD C:\Users\User_name\AppData\Roaming\XBMC\userdata\

mklink /D Thumbnails \\HTPC\Users\User_name\AppData\Roaming\XBMC\userdata\Thumbnails

Obviously, you need to adjust the paths for YOUR specific machine(s) or this won't work. Make sure you can reach the shared thumbnail directory through Explorer on each machine. If you can't, you have a permissions problem.

No further settings need to be adjusted, every machine that you do this on will essentially think it is using it's own thumbnails directory, but will in fact be using the HOST machines thumbnail directory. You do not HAVE to use the actual thumbnail directory of an existing XBMC installation as in the example code above. You could, for instance, use a neutral share and then create the symlink on the thumbnails directory for ALL of your machines.

If you were previously using the path substitution method, make sure you remove the path substitution from all machines that you use the symlink on.

MySQL speed-up tweaks
From: MySQL speed-up tweaks for XBMC. For v11 (Eden) only the first two tweaks are necessary. See Comments for more information.

In advancedsettings.xml:
Use the IP address and NOT the hostname of your MySQL server

In my.ini:
(add to mysqld section) skip-name-resolve

Windows
This will allow you to make a regular backup of your MySQL database using the schedule of your choosing and saving the backups for however many days you choose. Recommend performing daily backups and saving for a minimum of 7 days. This will give you enough time to discover a problem with the DB and restore to a previous version that did not have problems.

To begin, go ahead and download the command line version of 7zip. We will use this to compress our MySQL dumps. Create a new folder in your C directory named XBMCSQLBACKUP. So you should have a C:\XBMCSQLBACKUP\ location now. In this location, create another new folder and name it zip. So you should now have C:\XBMCSQLBACKUP\zip. Extract the contents of the 7zip download to this location. Once complete you should have: C:\XBMCSQLBACKUP\zip\7za.exe

C:\XBMCSQLBACKUP\zip\7-zip.chm

C:\XBMCSQLBACKUP\zip\license.txt

C:\XBMCSQLBACKUP\zip\readme.txt

We're going to create a down and dirty batch file to perform the actual backup, then we'll execute the batch script with the task scheduler built into Windows. For the purpose of these instructions, it is assumed that you are running MySQL 5.5 installed to the default location. If not, be sure to adjust your path(s) accordingly. It's also a good idea to save your backups to a network location to protect against local drive failure, so the paths here will reflect this. So here are the batch file contents:

Save this as XBMCbackup.bat at C:\XBMCSQLBACKUP Make sure you include the .bat at the end.

After you have edited the above batch file to reflect your paths and saved it as a batch file, all that is left is scheduling it to run. Daily backups are best, but you can use whatever frequency you are comfortable with. To do this, open up the Windows Task Scheduler.

In the Task Scheduler click on "Create Task...", NOT "Create Basic Task...". In the new task window, in the Name box put XBMC MySQL backup (or whatever name you want).

Then click on the Triggers tab, followed by the New button. Select Daily (or whatever you want) and adjust the time you would like it to run. Click OK.

Click on the Actions tab and click New. In the Program/Script box enter C:\XBMCSQLBACKUP\xbmcdump.bat (or whatever you named your batch file) and in the start in box enter C:\XBMCSQLBACKUP

Click ok, then click ok in the task window. In the main task scheduler window, right click on the task you just created and select run. If everything works as it should, you should now have a zipped backup of your database(s) in your backup location. It will now do this for you automatically.

Enjoy!

Linux
AutoMySQLBackup is a script that is designed to keep daily, weekly and monthly backups of your databases. It is very customizable and reliable. There is useful information on installing and configuring the script here: http://www.linux.com/learn/tutorials/659107-how-to-do-painless-mysql-server-backups-with-automysqlbackup.

Multiple profiles with one MySQL database
See: http://forum.xbmc.org/showthread.php?tid=81095&pid=840499#pid840499