reconstructing database

710 views
Skip to first unread message

Johan Helsingius

unread,
Sep 28, 2012, 10:40:55 AM9/28/12
to beets...@googlegroups.com
Having imported more than 20.000 tracks into the beets collection, something
went wrong (possibly caused by computer crash), and now "beet stats" shows
only 58 tracks. I can import new music OK, and the collection is still
there, but somehow they are missing from musiclibrary.blb.

Is there a way to rebuild the database by scanning the existing collection,
instead of having to re-import everything?

Julf

Adrian Sampson

unread,
Sep 28, 2012, 2:29:54 PM9/28/12
to beets...@googlegroups.com
To reconstruct a database, your best bet is to use a "non-autotagging" import. This is provided by the -A flag to the "import" command:

$ rm ~/.beetsmusic.blb
$ beet imp -AC /path/to/music

Let me know if that works out for you.

Adrian

Jonathan Fritz

unread,
Sep 28, 2012, 3:11:25 PM9/28/12
to beets...@googlegroups.com
Have you tried doing an integrity check on the database file?

I've had to "recover" a Banshee library that was corrupted in the past -
all of the data was still there, but some of the indices were broken. I
solved the problem by backing up the database, creating a new database
with the same schema, and then restoring the data. This rebuilt the
indices without having to re-import all of the data.

Check out this article for more info:
http://thelinuxexperiment.com/guinea-pigs/jon-f/recovering-a-corrupted-banshee-database/

Best of luck!
--
---
Jonathan Fritz
On the Web: http://www.jonathanfritz.ca

Johan Helsingius

unread,
Sep 29, 2012, 12:24:35 PM9/29/12
to beets...@googlegroups.com
> To reconstruct a database, your best bet is to use a "non-autotagging" import.

That worked! Many thanks!

Julf

Johan Helsingius

unread,
Sep 29, 2012, 12:25:26 PM9/29/12
to beets...@googlegroups.com
Jonathan,

> Have you tried doing an integrity check on the database file?

Yes, and it passed without problems - but it was still good advice
and worth trying!

Thanks!

Julf
Reply all
Reply to author
Forward
0 new messages