This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[Solved] Moving Amarok statistics to a new machine?

Tags: None
(comma "," separated)
Deathspawner
Registered Member
Posts
5
Karma
0
Hi all,

I built a new machine the other night and am in the process of preparing all the software and such so that I can move it over to replace the one I am using now. However, one thing I would love to be able to preserve are the statistics kept within Amarok (total plays, how many times each song has been played, moodbar, etc), however I am not that successful so far with my attempts.

The new PC is almost a mirror of the machine I've been using for some time. User accounts are the same and the mounts are similar. On both machines I have a /mnt/storage partition which has all of my music (each /mnt/storage was rsync'd, so they are identical). I had assumed that if I copied over the ~/.kde3.5/share/apps/amarok/ folder to the new machine, that everything would fall into place (considering everything should be in the same place), but that doesn't seem to be the case.

So simply put, is there a way to mirror Amarok from one machine to the next? I'll forfeit all the statistics if I have to, but it would be nice to be able to continue off of the ones I have since I've run about 60K through it thus far. (I don't keep track, Last.fm does ;-))

Thanks in advance for any help!

Last edited by Deathspawner on Sun Dec 16, 2007 9:16 am, edited 1 time in total.
Deathspawner
Registered Member
Posts
5
Karma
0
Hi all,

I figured this out... and I am sure it was easily documented somewhere, but I couldn't find it. If I clued into the fact that the statistics were saved within SQLite, I would have saved a few hours of time. That said, here are the basis instructions in case someone finds this in a search engine:

Both the current and the destination Amarok installations need to be as close to exact as possible, with the music collections mounted in the exact same spot (ie: /home/user/Music). You will need to download SQLiteExplorer in order to handle the database.

Download and install the program or find it in your distros repository: http://sourceforge.net/projects/sqlitebrowser

Make sure that Amarok was opened at least once on the destination machine, then close all instances you might have open. On the machine with the database source, you can open up SQLiteBrowser and open the Amarok database (found in ~/.kde/share/apps/amarok/collections.db). Once opened, you will see a standard database structure. Go to File > Export and save as a .SQL file. Once done, transfer that to the destination machine.

Open up SQLiteBrowser on the destination machine and open up the same database file. Once in there, delete ALL of the tables, with the Delete Table button on the top of the application. Once done, go to File > Import and import the .SQL file you exported from the other machine. There should be no problems as long as the database was empty before doing this. You can also import individual tables if you wanted, using csv files with the same process.

Once done, check out the Statistics table to make sure the data is there. If it is, then you should be done... so open up Amarok. If there are still no statistics, it's probably because there is no collection. Go ahead and create the collection, making sure that the Music folder location/s are the same on each machine... else it will not work.
User avatar
oggb4mp3
Registered Member
Posts
166
Karma
0
Why couldn't you just copy the collection.db file to the new machine?
Deathspawner
Registered Member
Posts
5
Karma
0
I did numerous times... and not once did it work. I rsync'd the entire Amarok profile from the old machine to the new one and it didn't work, though paths should have not changed at all. So, I am not sure why it didn't work, but I am glad I could use the SQLiteBrowser as a backup.
domicus
Registered Member
Posts
1
Karma
0
Trying to import the sql file the way you suggested didn't quite work for me. I got an error and didn't try to investigate it but instead tried to just copy and paste the old collections.db to the new machine.

This actually worked after restarting the machine but I have a small problem now.

Looking at the database, there are all my lyrics stored but Amarok doesn't show them. Any idea how to sort that out?
It's not a big problem because as I listen to the music, all these lyrics will be downloaded once again but I wonder how come Amarok doesn't read them from the database.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]