Page 1 of 1

Is it possible to run a database cleanup from command line?

PostPosted: Thu Jun 27, 2013 3:10 pm
by Rocketcandy
We are running into some issues with symbolic links so we have to remove the old symlinks then cleanup the database and re link files if we move them. I have a script running that does all of that for us but I still have to manually run the database cleanup so if there is a way to run that from command line and I can add it to my script the entire process would become automatic.

We are running subsonic on Ubuntu 12.04 LTS
License Subsonic Premium
Version 4.8 (build 3434) – April 17, 2013
Server jetty-6.1.x, java 1.6.0_27, Linux (119.7 MB / 193.6 MB)

Any help would be great!

Re: Is it possible to run a database cleanup from command li

PostPosted: Mon Jul 08, 2013 12:52 am
by Rocketcandy
Basically I want to run (from command line on Ubuntu 12.04 LTS) this link from the settings menu: musicFolderSettings.view?expunge or run it from the musicFolderSettings.jsp file.

Is that possible?

Thanks,
Rocket

Re: Is it possible to run a database cleanup from command li

PostPosted: Mon Jul 08, 2013 1:23 am
by daneren2005
You'll probably have to do some playing with this but you should be able to something like:

wget 127.0.0.1:4040/rest/musicFolderSettings.view?expunge

Or if it isn't a full rest URL remove the rest part. You seem to have found out what the URL is from somewhere so just use whatever it is there.

Sent from my HTC One X using Tapatalk 2

Re: Is it possible to run a database cleanup from command li

PostPosted: Mon Jul 08, 2013 1:31 am
by Rocketcandy
I tried something similar to that but I'm not logged in so I can't access that part of the site yet. Somehow I need to login then run that command then close the connection.

Re: Is it possible to run a database cleanup from command li

PostPosted: Mon Jul 08, 2013 3:35 am
by gurutech
Try changing the line to read:

wget 127.0.0.1:4040/rest/musicFolderSettings.view?u=admin&p=password&v=1.8.0&expunge

where you replace "admin" and "password" with your information.