Page 1 of 3
Switching from Windows to Linux

Posted:
Sun Mar 04, 2012 5:56 pm
by WildWalker
Hello All,
A little background for you:
I have been using Subsonic for quite some time now on a Windows server (well a 1U server running windows 7) but this server chews through 150-200 Watts of electricity every second of every day (costing around £15 per month in electricity) and this is not my only server.
So, I am going to use a laptop for now (it might not be powerful enough, but lets see) as its only me and my immediate family that use it (4 users) and with the screen off it uses only 12 watts (plus 4 watts for two usb ext drives). Ultimately I want to use the raspberry pi (which is why I am using Linux) to do this job.
So, I have installed Ubuntu 11.10, and Subsonic 4.6, no problems so far. However, I was wondering if I can now copy the relevant Subsonic files from Windows to Linux so I retain all the coverart, the number of plays, recently added etc etc.
Is this possible?
Oh yes, I am still looking and might have found them by the time I get a reply, but where in Linux are all the Susbsonic folders?
Thanks in advance.
Alan.
Re: Switching from Windows to Linux

Posted:
Sun Mar 04, 2012 6:14 pm
by ytechie
Well, the subsonic folders are in /var/subsonic for me. I don't remember if that is the default, or if I changed it, but you can always check.
The subsonic files are going to be different because of the directory changes. You're much better off starting from scratch in my opinion, because things can get pretty messy very quickly if you try to make everything work from a Windows machine to a Linux machine.
Re: Switching from Windows to Linux

Posted:
Sun Mar 04, 2012 6:19 pm
by WildWalker
Thanks ytechie.
I assumed, as Subsonic was a web application, that the folder structure below the top level folder would be the same?
A bit like moving a web site from iis to apache?
Do you know how to access the subsonic folder, I can open it in a terminal if I use 'su' but I want to open it in the GUI, when I try I get 'access denied' even though I am logged in as Administrator with Administrator priviliges.
All the best,
Alan.
Re: Switching from Windows to Linux

Posted:
Sun Mar 04, 2012 6:29 pm
by WildWalker
Maybe all I need is this:
subsonic\db
I guess this is what holds all the users and useage information. Is the database format the same for both, I would guess so, unless windows and linux need separate fields for some reason?
Alan.
Re: Switching from Windows to Linux

Posted:
Sun Mar 04, 2012 6:30 pm
by ytechie
You can probably move the web files and the java files, but those aren't specific to your machine. Unless you modified any of them, they should be identical to the files of your particular version of subsonic. The files you would want to copy are the database files that contain your information (users, files, ratings.)
But because the directory structure is probably different between machines, copying those files would not do very much at all.
To access the files with the GUI, try changing the file permissions. Use chmod to modify the permissions so that your user can read (and write if you want) the files.
If you need help doing this, just ask!

Re: Switching from Windows to Linux

Posted:
Sun Mar 04, 2012 6:31 pm
by ytechie
Didn't see your last post Alan.
The database structure is the same, but the contents should be different.
The directories are different, and that is very important.
Re: Switching from Windows to Linux

Posted:
Sun Mar 04, 2012 6:31 pm
by WildWalker
CHMOD, is that a bit like Windows RASH?
Alan.
Re: Switching from Windows to Linux

Posted:
Sun Mar 04, 2012 6:32 pm
by ytechie
Not sure. The command would look something like "sudo chmod 755 /var/subsonic -R"
Re: Switching from Windows to Linux

Posted:
Sun Mar 04, 2012 6:35 pm
by WildWalker
Okay, so my var/subsonic/db folder in linux has the properies drwxr-x---
the properties seem to be derived from sum number set (777 full access?)
I want to set the folder so I can copy files, but set it back to what it should be after

Alan.
Re: Switching from Windows to Linux

Posted:
Sun Mar 04, 2012 6:36 pm
by ytechie
Try "sudo chmod 770 /var/subsonic/db -R" and change it back using "sudo chmod 750 /var/subsonic/db -R"
Re: Switching from Windows to Linux

Posted:
Sun Mar 04, 2012 6:39 pm
by WildWalker
Okay, did that thanks, I can now access via GUI

How do I stop the subsonic service?
Best Regards,
Alan.
Re: Switching from Windows to Linux

Posted:
Sun Mar 04, 2012 6:41 pm
by ytechie
"sudo service subsonic stop"
Check this out:
viewtopic.php?f=6&t=1546#p36221
Re: Switching from Windows to Linux

Posted:
Sun Mar 04, 2012 6:44 pm
by WildWalker
Cool thanks

Rebooting now, will let you know what the result is, I only copied the files in the db folder.
Alan.
Re: Switching from Windows to Linux

Posted:
Sun Mar 04, 2012 6:52 pm
by WildWalker
No Luck,
Looks the same as a new install

Alan.
Re: Switching from Windows to Linux

Posted:
Sun Mar 04, 2012 6:59 pm
by WildWalker
Well,
I copied the whole folder this time, and my correct theme came up. but not much else.
I have my music on a USB hard disk, and have added the folder /media/250_Black/_Media/_Music as the music location, but can not see any music, have I added the ext drive incorrectly?
Alan.