XBMC Community Forum
HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Announcements, Info, and General Discussion (/forumdisplay.php?fid=85)
+--- Forum: Tips, tricks, and step by step guides (/forumdisplay.php?fid=110)
+--- Thread: HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker (/showthread.php?tid=80829)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38


- aptalca - 2011-08-19 18:00

svenh Wrote:Can you share a quick howto for people who may not be as familiar with how to use cwrsync? Might help some other people out!

Just check out this faq section on the cwrsync website.

There are guides on how to setup connections between different server and client setups (win/win, win/linux, etc.) and also with or without SSH.

Instructions are very easy to follow.

I use cwrsync on my windows laptop to take backups of my website hosted on a remote linux server. Once I installed the client software, all I had to do was to edit the batch file that came with it called "cwrsync.cmd" (which sets the paths for rsync and ssh, etc.) and add the line at the end
Code:
rsync -av 'ssh -p 1234 -i sshkeypath' sourcefolderpath targetfolderpath

Replace 1234 with your ssh port and in folder and file paths, in windows, for c:\backup\ use this format instead: /cygdrive/c/backup/

I run this command file every once in a while manually. (My website is already being backed up on two different sites online, automatically, so the local backup is an absolute worst case scenario) But in win 7 you could use start/control panel/system&security/administrative panel/task scheduler to automate it.

And also keep in mind that rsync is one way. But for thumbs folder we need it to be two way. So just replicate that line in the same batch file and switch the source and target folder paths. And do not use the --delete option.

**UPDATE**

I just realized that since we are doing a two way sync and files might have been modified at either the server or client, we need to use option -u as well. Because that will prevent a destination file to be overwritten if the destination file has been modified.

--I am assuming XBMC overwrites a cache file when the artwork is changed. Even if it doesn't this option won't hurt. --

Scenario: Client 1 changes fanart for movie A. Client 1 rsyncs with server. The cache file for movie A's fanart is updated on the server.
Client 2 rsyncs with server. Let's say it does client-to-server sync first. Both the client and the server has the same cache file for movie A's fanart. But the one on the server is modified last and is the one we want. Without the -u option, client-to-server sync will overwrite the cache file on the server and we revert the recently changed fanart to the old one. But with the option -u, during client-to-server sync, cache file is ignored, and when it's time for server-to-client sync for client 2, the local cache file gets overwritten by the one on the server because it is a later revision, which is exactly what we want.

So the batch file code will look something like this:

Code:
rsync -avu 'ssh -p 1234 -i sshkeypath' clientfolderpath serverfolderpath
rsync -avu 'ssh -p 1234 -i sshkeypath' serverfolderpath clientfolderpath



- smiffy1989 - 2011-08-20 22:21

Is the -r option needed also to sync recursively?


- elmerohueso - 2011-08-21 05:54

I got my library synced. Since the library doesn't include the fanart and covers, I used a scraper to store each movie's cover and fanart locally to so each XBMC setup wouldn't have to scrape its own data. However, my other XBMC boxes were only seeing the locally stored fanart and still going online for all the covers. I saw some other suggestions for syncing the Thumbnails folder instead or even using symbolic links. However, after some searching, I found you can just change the path of the Thumbnails folder (at least in the nightlies). So, I shared the Thumbnails folder on my media server (which is hosting the library in MySQL) and added the following code to my advancedsetting.xml on my other boxes:
Code:
<pathsubstitution>
    <substitute>
        <from>special://masterprofile/Thumbnails</from>
        <to>\\[ServerName]\[SharedThumbnailsFolder]</to>
    </substitute>
</pathsubstitution>

It seems to be working just fine. It requires less work than syncing the multiple Thumbnails directories, and I don't have to worry about symbolic links.

Hope this helps anyone else.


- ederson - 2011-08-21 16:29

i have a strange problem

when i use the mysql db i can`t access the movie info screen ..... !!!!!!!!!!!!!!
the moment i return to the local db everything is ok.

could anyone verify this or it`s just me and i should check my installation ?


it seems that it`s happening only to imported date from the dharma db ..... i guess it`s off topic


- aptalca - 2011-08-21 22:07

smiffy1989 Wrote:Is the -r option needed also to sync recursively?

the -a option includes recursive

taken from here:

Quote:rsync option -a indicates archive mode. -a option does the following,

Recursive mode
Preserves symbolic links
Preserves permissions
Preserves timestamp
Preserves owner and group



- phsyraxion - 2011-08-22 07:12

There are a few issues with the shared SQL option I have discovered.

I am testing between 2 machines and my server. I have it all setup and all seems great. I have a system for syncing thumbs and it's all working so far... Except...

I also have the Constellation iPad App and it seems that when using an SQL database you can not use remote apps for browsing the system. As soon as the app connects to XBMC, the files in XBMC disappear.

This sux because tha ipad app was one of the main attractions for switching to XBMC and I need to maintain multiple machines.


- gabbott - 2011-08-22 16:21

phsyraxion Wrote:I also have the Constellation iPad App and it seems that when using an SQL database you can not use remote apps for browsing the system. As soon as the app connects to XBMC, the files in XBMC disappear.

This sux because tha ipad app was one of the main attractions for switching to XBMC and I need to maintain multiple machines.

Not sure what you mean by the files in XBMC disappear but I have no issues using the android remote and browsing my library with it.


- Headcase_Fargon - 2011-08-24 17:11

So I tried this last night and got some interesting results. I decided to install MySQL on my very low power media server. It's running a single core Atom processor under Ubuntu. I got everything set up and got the dreaded performance hit in XBMC.

What's strange is the type of performance hit. Even navigating the home menu (going from System to Shutdown, for instance) would have a 15-30 second delay.

I tried the skip-name-resolve option in my.cnf and double-checked to make sure that Windows firewall was off on the HTPC machine. No change in performance. I should note that these boxes are connected via gigabit ethernet.

I decided to install MySQL on the Windows box and have the advancesettings file use localhost. Working fine now.

Could it be that Atom machine is just that slow? Why would it slow down all of XBMC (even settings menus) and not just the library?


- phsyraxion - 2011-08-25 03:00

gabbott Wrote:Not sure what you mean by the files in XBMC disappear but I have no issues using the android remote and browsing my library with it.

What I mean is this:

I am using the nightly builds of pre-eden and what is happening is I am getting disconnected from the SQL database on the server for some reason which then causes the TV Shows menu and the Music menu to show nothing inside them when opening them on XBMC.

This happens more regularly when using a remote app such as the iPad constellation and also happens if I enable a "random video" or "random music" widget for the home page of the skin I use (Aeon Nox). Even with all these things OFF I get an occasional disconnection from the database. Here is a log:

LOG

Some specs to go along:
- PC: i5, 2GB Ram, XPSP3
- SERVER: 3.6Ghz Duo, 1GB RAM
- XBMC Version (Last tested was nightly build Aug24-2011)
- SKIN: Aeon Nox (but also tested with default)
- iPad App Tested: Constellation / xbmotec / commander
- Touchscreen Software: Yatse (gets disconnected from xbmc as well)

The commander remote seems to be the only one I don't have an issue with BUT I cannot get gesture navigations working on that which is another story.

What I see in the log is a massive amount of errors. The log is from a test of xbmc simply starting, navigating some shows and watching an episode. There appears to be a huge amount of errors with trying to obtain artwork but I cannot see the reason why. All folders for media are shared and accessible on the network by anyone and it all shows up fine in xbmc until I get disconnected.

I'd like to know if anyone is using similar setups and has had success


- phsyraxion - 2011-08-26 00:41

To update on this

I have rolled back to the stable 10.1-Dharma release and created fresh SQL tables to test with. I re-imported content from scratch and have been browsing, watching and remotely controlling xbmc flat out for the past day.

I have not had a single disconnection so far so I believe the issue was either the latest builds or my database at the time.


- Hyram - 2011-09-06 22:44

Wouldn't it be a whole lot simpler if XBMC just stored all of that metadata alongside the media files themselves?

With high speed networking and high speed storage becoming the norm, I've come to the conclusion that relying on an internal database is a hindrance to XBMC's flexibility and power, not a benefit.


- Methanoid - 2011-09-17 21:08

Hyram Wrote:Wouldn't it be a whole lot simpler if XBMC just stored all of that metadata alongside the media files themselves?

With high speed networking and high speed storage becoming the norm, I've come to the conclusion that relying on an internal database is a hindrance to XBMC's flexibility and power, not a benefit.

Amen to that... bloody crazy way to do things. Then you'd always be sync whether 1 or 10 machines. Just point to where the media is stored. Angry


- hyperlink - 2011-09-23 21:03

I think many users do store the data with the media with the files using ember, mediacompanion etc.

If there isnt a library/database wont XBMC have to scan the folders every time you access a given media type? There is a reason pretty much every media software uses libraries.


- StanLee - 2011-09-25 22:28

Hi I have been a long time xbmc user.. since well first xbox I got my hands on. and mod.. Tongue

Well that was a looong time ago. and well time as we know it has expanded to when it comes to devices and sutch. Now in that time 2000 We wanted to do server based XBMC.. And there was non. Now there is sorta.. But lakking allot in IMO.
I know there has been a big dscussion on how to make this the best way to go, but when I beta tested the Nightly build og EDEN. and got big problems With it trying to update the MYSQL DB.. from ver. to ver. everything got messed up.. Now thats ok cus it's a nightly.. and it will be fixd probably.. what makes me a little woried is when I read that alot of the coders do not use XBMC in multiple rooms.. That scary for the future of this wonderful product. Lets face it. we are not gonna get less devices in the house.

Like for me I'm on 4 Devices in my house. one on the Bathroom , one Kitchen, one livingroom and one for the Kids.. Now I use Android Phones and Tablets to control the different devices..

I hope the Dev's will start taking the Server Client issue a bit more serrious.. Or somone else will and then by by xbmc. I would hate for that to happen. But hey that s my opinion.

I hope that this will be better in the future.

I use XBMC as of 2011.09.23 and I did not fix my DB problem. I changed the Version of the DB to 56 from 42.. but then it conected.. and all content was there but no movies showing in Library mode..
it made a new View that I did not have when sarting with a new xbmc_movie db.. but now how do I get all Watched tag.. or Play Count from the Files table to work.. thats the main problem and then the last addedto db will be off. etc..

I love the LifeHacker guide. nice and easy way to get started with MYSQL..


trying to centralize the info on Slow performance - seth.feinberg - 2011-09-26 21:24

First off, thanks to EVERYBODY on here for all the help with my MySQL adventure and all my other xbmc questions. I am constantly amazed by how generous everybody on here is with their time and know-how.

Anyways, I have MySQL set up running on a Synology 1511+ and accessing it with a HTPC and a jailbroken ATV2 (as of midnight last night), both on gigabit ethernet. I used the typical database entries in adancedsettings.xml as well as a pathsubstitution to sync the thumbnails (as well as identical sources.xml files using the username:password@internalip naming convention). As I said everything is working but its pretty slow (as others have reported about 20-30 secs to update when I click on Movies). I was just looking for clarification on a few things before I try what I found and hoping someone has some answers (I'm sure they would help others as well):

1) Is there any known performance differences between using the pathsubstitution in advancedsettings.xml or creating symlinks? Seems like the same, just curious if this is something I should try.

2) Multiple people reported early in this thread that MySQL was very slow when they tried to import their old library after setting up MySQL and that when they redid it by just reBUILDING their library it worked must better. But then nobody else suggested this. Can anyone confirm if this is still a possible fix/help? I'd hate to redo everything if its not gonna help but there's another hurdle before I try the other things:

3) As I said, I have MySQL running on my NAS and cannot easily edit the .ini file. I'd like to do this (http://forum.xbmc.org/showpost.php?p=646799&postcount=5), but I'm a noob and though I figured out how to Putty into it, I (apparently) need to learn the vi command in order to make changes. Can anybody offer any advice on how to implement these changes? Can it be done with PHPAdmin (the web interface)?

and this last one is just for my edification because I don't think its related to the speed but I've read conflicting information, but do I need a sources.xml file with identical Movie and TV Shows links for all the installations? Seems redundant but also have heard its necessary.

Anyways any help would be greatly appreciated (as it already is!).