database corruption -- how to fix?

Andrew Turner andrewturner512 at googlemail.com
Tue Jan 23 12:00:32 UTC 2007


The fact that you have dupes in the devices table is a bit strange.
That makes me suspect that there is/was a change in how devices were
being reported (eg maybe previously it was using HAL and now isn't, or
the converse). I would suggest first checking that HAL is running and
kded is using it (for me, this means that doing the dcop call I
mentioned before reports UUIDs for devices).

If fiddling with HAL doesn't somehow fix it, you might want to try
(after backing up your DB and closing Amarok):
UPDATE devices SET id = 9 WHERE id = 4;
UPDATE devices SET id = 4 WHERE id = 2;
UPDATE devices SET id = 2 WHERE id = 9;

This really shouldn't be necessary though, and I don't guarantee it to
be correct.

Andrew

On 22/01/07, Mats Ahlgren <mats_a at mit.edu> wrote:
> On Jan 22, 2007, at 9:18 AM, Andrew Turner wrote:
>
> > Ok, well the basic approach is to try to work out if kded/hald are
> > working by running:
> > dcop kded mediamanager fullList
> >
> > That should give you a list of devices. Check the one with your
> > collection is listed.
> >
> > Next, using the SQLite binary (from www.sqlite.org),
> > SELECT id, lastmountpoint FROM devices;
>
> 1| /media/windows
> 2| /                                     <--- chose this one
> 3| /media/windows
> 4| /
>
> > Identify the one that should have your collection on. check how many
> > songs amarok thinks there are on that device (eg for id = 5):
> > SELECT count(url) FROM tags WHERE deviceid = 5;
>
> 3522
>
> > It's also worth looking in ~/.kde/share/config/amarokrc for the
> > [Collection Folders] section (note this is _not_ the now deprecated
> > Collection Folders field in the [Collection] section).
> > The format is something like:
> > 5=./music
> > where 5 refers to the device as above, and your collection folder has
> > an absolute path last given by: lastmountpoint_for_device5 + ./music
>
> 2=./home/mats/Music/Library
>
> > Note: deviceid = -1 means that for some reason Amarok couldn't figure
> > out which device your collection folder is on. The path is specified
> > relative to / .
> >
> > If there are weird dupes in that section of amarokrc, or the deviceids
> > are negative, but you are running kded/hald, or the deviceids are
> > positive but you aren't running kde/hald, problems may well happen.
>
> I have a process called kded running.
>
> What is all this telling me?
>
> Also, I tried overwriting my database.db file with an old backup;
> nothing happened (no statistics on any of the songs).
>
> I recently had file system corruption with ext3 (how on Earth? is
> this common...) and so a few random files got put in lost+found...
> maybe that is the culprit? If you think it is; how would I go about
> transferring the old DB (with everything such as ratings) to a new
> installation of Amarok on a fresh system?
>
> Thanks,
> Mats
>
> > Andrew
> >
> >
> > On 22/01/07, Mats Ahlgren <mats_a at mit.edu> wrote:
> >> No problem; thanks for replying.
> >>
> >> Unfortunately this is Amarok 1.4.3 and I'm not viewing my collection
> >> over NFS.
> >>
> >> Thanks,
> >> Mats
> >>
> >> On Jan 22, 2007, at 8:43 AM, Guðlaugur Jóhannesson wrote:
> >>
> >> > Sorry for coming in so late, but could it be that the new dynamic
> >> > collection
> >> > is giving you a hard time.  This could happen if you have recently
> >> > upgraded
> >> > amarok and mount your music collection over NFS or other removable
> >> > media.  To
> >> > turn it off set
> >> > DynamicCollection=false
> >> > in the [collection] section in amarokrc.
> >> >
> >> > --
> >> > Guðlaugur Jóhannesson
> >> > Tel: +354 849 8405
> >> > http://www.raunvis.hi.is/~gudlaugu/
> >> > _______________________________________________
> >> > Amarok mailing list
> >> > Amarok at kde.org
> >> > https://mail.kde.org/mailman/listinfo/amarok
> >>
> >>
>
>



More information about the Amarok mailing list