strange database problem
Seb Ruiz
me at sebruiz.net
Wed Mar 21 22:56:52 UTC 2007
Hi sebastian,
Amarok stores statistics in the database with relative paths from the
drive root. Since you moved the root (from sdb3 to sdb4 ), it's not
going to work.
You'll need to do some manual fixing of your database. Make sure you
are not running Amarok, and make a backup of collection.db.
In the 'devices' table, you will see a list of tables:
seb at hammerhead:~/.kde/share/apps/amarok$ sqlite3 collection.db
SQLite version 3.3.13
Enter ".help" for instructions
sqlite> select * from devices;
1|uuid||/|/org/freedesktop/Hal/devices/volume_uuid_aed7daa5_91f9_40c6_a859_dd2eaf5399c4||
sqlite>
This shows that i have one device, with id 1 and hardware id
volume_uuid_aed...... whatever
You will have more than one, with at least one for the old device, and
one for the new device.
Once you have determined which is your new device, you will need to
update all the rows in the rest of the database to match the new id.
Important: I am assuming your old id is A and the new one is B.
Replace them as relevant
sqlite> UPDATE embed SET deviceid=B WHERE deviceid=A;
sqlite> UPDATE images SET deviceid=B WHERE deviceid=A;
sqlite> UPDATE labels SET deviceid=B WHERE deviceid=A;
sqlite> UPDATE lyrics SET deviceid=B WHERE deviceid=A;
sqlite> UPDATE playlists SET deviceid=B WHERE deviceid=A;
sqlite> UPDATE statistics SET deviceid=B WHERE deviceid=A;
sqlite> UPDATE tags SET deviceid=B WHERE deviceid=A;
sqlite> UPDATE tags_labels SET deviceid=B WHERE deviceid=A;
sqlite> UPDATE uniqueid SET deviceid=B WHERE deviceid=A;
Now, restart Amarok and hope it works.
On 22/03/07, Sebastian Leibnitz <sebastian.leibnitz at googlemail.com> wrote:
> Hi all!
>
> I've got to admit, I am fairly new to the world of Linux and my problem
> might therefore be less strange than I think.
>
> Basically, Amarok seems to have lost all information stored in the database
> (score, playcount, everything...), although the file is still where it was
> (and still seems to contain all data)
> New changes are stored fine though.(that is, playcount is updated just fine,
> but from scratch)
>
> what i did to cause the problem:
>
> I've recently moved my whole /home directory from one partition (formerly
> sdb3, mounted as /home) to another (sdb4, now mounted as /home)
>
> sdb3 doesn't exist anymore (sdb=sdb1,sdb2,sdb4)
>
>
> I copied the whole thing with
> cp -r -p source dest
>
> Well, i did it piece by piece (because i couldnt move the whole thing at
> once), resizing both partititons in between (enlarging sdb4, shrinking sdb3)
>
> Everything worked find, except for the database in amarok problem. (that is
> every other configuration, data just worked when i mounted sdb3 as /home and
> rebooted)
>
> The database seems as if it were fresh(collection.db is 8MB large), new
> things are added fine(and collection.db is modified when that happens).
>
> I then reinstated a backup of mine (i made a backup before messing with my
> partitions).
> So I restored /.kde/share/apps/amarok and /.kde/share/config/amarokrc to
> their backup-state.
>
> It didnt help though, all it does is reset every new changes to the database
> since the problem occured (logically), and i start with a "fresh" database
> again.
> I didnt get back my old scores/playcounts/etc, unfortunately.
>
>
> some data from my amarokrc (sle=user)
>
> [Collection]
> DatabaseEngine=0
>
> [Collection Browser]
> Category1=2
> Category2=1024
> Category3=64
> Database AFT Version=2
> Database Devices Version=1
> Database Persistent Tables Version=19
> Database Podcast Tables Version=2
> Database Stats Version=12
> Database Version=35
> FlatColumnWidths=133,131,0,131,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
> ShowDivider=true
> ViewMode=0
>
> [Collection Folders]
> 8=./sle/music,./sle/music_temp,./sle/musictemp
>
>
>
> conclusion
>
> I have none. Though i am hoping that somebody here needs only half a minute
> to figure out what happened.
>
>
> Sincerely (thanks in advance),
> Sebastian.
>
> _______________________________________________
> Amarok mailing list
> Amarok at kde.org
> https://mail.kde.org/mailman/listinfo/amarok
>
>
--
http://www.sebruiz.net/
More information about the Amarok
mailing list