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

General discussions.

Moderator: moderators

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

Postby Rocketcandy » Thu Jun 27, 2013 3:10 pm

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!
Rocketcandy
 
Posts: 3
Joined: Thu Jun 27, 2013 2:59 pm

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

Postby Rocketcandy » Mon Jul 08, 2013 12:52 am

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
Rocketcandy
 
Posts: 3
Joined: Thu Jun 27, 2013 2:59 pm

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

Postby daneren2005 » Mon Jul 08, 2013 1:23 am

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
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

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

Postby Rocketcandy » Mon Jul 08, 2013 1:31 am

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.
Rocketcandy
 
Posts: 3
Joined: Thu Jun 27, 2013 2:59 pm

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

Postby gurutech » Mon Jul 08, 2013 3:35 am

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.
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm


Return to General

Who is online

Users browsing this forum: No registered users and 26 guests