[Windows] [How-to] Sync library on multiple XBMC PCs w/o mySQL
#1
Requirements:
  • Windows XBMC Setup
  • Networkshares, where you share your media like a NAS or a network storage device
  • DSynchronize (Sync Tool, Download here)


This is how it works:
Your library is stored on a network storage/device, all your XBMC systems can access. Your library is stored there too. The things we do now make your PCs synch the data on their local drives with the network storage in real-time. That way you can use all the advantages of XBMC sharing a library, like watching a movie in one room, setting a bookmark and go into another room and start the movie at this exact point. And your databases are up to date on all the mashines all the time.
Works perfect for me. I use XBMC on Win7 and XP and tried it with all versions from 9.04 upwards to Eden beta1.

So let´s get started:
Perform all steps on all machines!!

If you downloaded the dsynchronize tool copy it to your program files folder and create a second folder called dsynchronizestart and paste the files into here as well (so you got the program twice!)

Go to your xbmc appdata folder (in portable mode in the program folder, in regular mode here):
  • Windows XP: Documents and Settings\<your_user_name>\Application Data\XBMC\
  • Vista/Windows 7: Users\<your_user_name>\AppData\Roaming\XBMC\
Take the XBMC folder and copy it. Paste it in the network device at a place where every PC can access it.

Now we want to make sure, all PCs access the libraries on the same drive (e.g. X:\).
Here we create a bat file that´s started with Windows.
Start the editor and paste the text between <<>> into the file:

<<
:anfang
ping -n 4 IP-address of the Network device > nul
if errorlevel 1 goto anfang

net use * /delete /yes

ping -n 1 IP-address of the Network device > nul
if errorlevel 1 goto anfang

NET USE R: \\ IP-address of the Network device\folder /user:NAME PASSWORD /PERSISTENT:NO

cd C:\Location of Dsynchronize folder
start DSynchronize.exe /MINIMIZED /START

cd..
cd..
cd..
cd..
start autostart.vbs
start xbmc.lnk –d10
exit
>>

Save as it start.bat and copy it to C:\. Create a file shortcut and paste it to your autostart folder. Go to file properties and choose as option “minimized”.

This file makes sure that first the network access is there and that the network storage is always the same drive. Fill in the right IP address, or alternatively the networkname of the device and the password and user, if necessary. You can create more than one drive this way by just copying the command.
The rest of the file you have to adjust with your specific infos e.g. the location of Dsynchronize, XBMC is started with a delay of 10 seconds, so that dsynchronize was performed beforehand. You can adjust this by changing the numer behind the –d parameter.
The autostart.vbs we will create in the next:

Start the editor and paste the text between <<>> into the file:

<<
Dim T1, T2, X0, X1, X2, P1, P2
X2=0

Do While 1 > 0

if X2 < 7855 then

Set WshShell = WScript.CreateObject("WScript.Shell")

P1="c:\0815.lnk"
P2=1

WScript.Sleep 30000

WshShell.Run P1, P2

end if

T1 = time
WScript.Sleep 10000
T2 = time

X0 = T2-T1
X1 = CDate(X0)
X2 = CLng(1/X0)

if X2 < 1 then
X2 = 8640
end if

Loop
>>
Save it as autostart.vbs on your C:\ drive.



Create a file shortcut of the Dsynchronize.exe in the Dsynchronizestart folder we have created previously and copy it into your C:\ drive. Rename it to 0815. Go to file properties and add this parameters to the location: /MINIMIZED /START
Create a file shortcut of the XBMC.exe and paste it to your C:\folder. Go to file properties and add this parameters to the location: -fs
Now we have to make the right settings in the Dsynchronize Sofwares.
We created two versions because one starts, whenever you start your PC and synchronizes changes in realtime. The otherone is started at least ten seconds after you start your PC or wake it up from hibernate or suspend/standby mode. This way we make sure that if you just hibernate your PC the synching is done.

Go to Program files and start the Dsynchronize.exe in the dsynchronize folder.
This window is really easy to understand. First pick the folder to synchronize (you can select other folders ontop if you want them to ba synched in real time).
The folder to choose on left side is the in the XBMC userdata folder you can find in the app data folder.It´s called databases. On the right side, choose the same folder you just copied onto your network device. Checkmark the folders.
Checkmark on:
  • Copy only new files
  • Bidirectional synchronization
  • Create folder if not exists
  • Save on exit
Leave all other checkmarks blank. Now checkmark Realtime sync and click OK on the opening window. You can now close the program (so data will be saved,
On the Dsynchronizestart version you can do the same but the checkmark on realtime sync and put a checkmark on “Exit at the end”. This program will automatically be started from autostart.vbs and closes afterwards.
Because the XBMC folder might be very big (resulting in a long syching time) and usually only changes in the database folder occur, I pick just the XBMC\userdata\database folder for synching and when necessary (like addons I newly installed or thumbnails that are new) I perform a synch on the XBMC folder. So I would recommend to just pick the mentioned database folder in this program. You can now close the program (so data will be saved,

Once in a while, if your system crashes the data in Dsynchronize can get lost. This might be annoying. So I save a copy of the Dsynchronize.ini file as dsynchronize.ini.old to rename it if that happens.

So this is it. I hope you can get through this guide. It was a little difficult to create cause I had to translate the things to English.
If you got any fixes or ways to make this work better, let me know.
Reply
#2
How am I supposed to do this on my apple tv 2?
Reply
#3
Like I stated in the requirements, it is only possible with Windows Systems. Sorry.
Reply
#4
Hi

Thanks for this guide - I am really struggling with the final part of your guide though. The Dsynchronizestart exe file will not save the information that I put into it once it is closed... not sure why, could you explain it in more detail please? I am finding the following line confusing: "On the Dsynchronizestart version you can do the same but the checkmark on realtime sync and put a checkmark on “Shutdown at the end”. This program will automatically be started from autostart.vbs and closes afterwards."

Thanks for all of your efforts....
Reply
#5
thechinmaster Wrote:Hi

Thanks for this guide - I am really struggling with the final part of your guide though. The Dsynchronizestart exe file will not save the information that I put into it once it is closed... not sure why, could you explain it in more detail please? I am finding the following line confusing: "On the Dsynchronizestart version you can do the same but the checkmark on realtime sync and put a checkmark on “Shutdown at the end”. This program will automatically be started from autostart.vbs and closes afterwards."

Thanks for all of your efforts....


Hey. Did you put a checkmark on "save on exit"? Usually this should save the data you configured.
With that confusing sentence I meant that you should configure the Desynchronizestart version just like the other one with the difference that you should not checkmark "real-time-synch" and instead checkmark "Exit at the end".
Hope this helps. Cheers.
Reply
#6
Hey guys.
It was not the checkmark at "shutdown at the end", instead it has to be a checkmark on "exit at the end" in the Desynchronizestart Version. I updated the guide already!
Reply
#7
thanks for clarifying - actually the problem I had was with the program itself, for some reason the copied version will only repeat what I have set in the first version -managed to get it working by doing it in reverse order.

I havent had time to complete my way through the guide, but will do so as soon as I have time tonight.

Thanks again for all your hard work - i'll let you know how I get on!Big Grin
Reply
#8
has anyone one succeeded with this?? im hoping to sync my library & fanart to both my pc's without a hiccup. i dont understand why xbmc makes something easy for this process. my office pc has the current library and updates and need to get the living room pc to act the same. will this process accomplish that?
Reply

Logout Mark Read Team Forum Stats Members Help
[Windows] [How-to] Sync library on multiple XBMC PCs w/o mySQL1