Losing Database on Computer Restart

weaver4
2011-02-26
2013-05-30
  • weaver4
    weaver4
    2011-02-26

    When I start my computer the database is empty.  I will set up MediaTomb with three directories; everything runs great.  But when I restart my system all of my directories and their content is gone.

    I have MediaTomb running on Ubuntu 10.10 and I have all of my content on an external USB drive.  I have Mediatomb running as an service.

    I think the problem may be that the MediaTomb service starts before my Ubuntu System detects my usb drive.  Media Tomb does not see the content so it deletes the entries in the Database; just a guess.

    How do I fix this?

     
  • weaver4
    weaver4
    2011-02-26

    I tried running it from my .profile and not as a service.  Same problem.

     
  • BT
    BT
    2011-02-27

    Have you enabled inotify or timed scan? Inotify scan might remove your files if they are not available when MediaTomb is started.

     
  • weaver4
    weaver4
    2011-02-27

    I am using inotify.

    What I finally ended up doing was removing it as a server.  I then wrote a script that would sleep for 60 seconds and then start mediatomb and then added this script to my .profile.

    Here is the script; called mediatombstart

    1
    2
    3
    4
    5
    6
    7
    #! /bin/sh
    echo "Starting MediaTomb"
    # wait for usb drive to be seen
    sleep 60
    # start MediaTomb
    echo "starting Mediatomb" > MediaTombLog.txt
    mediatomb
    

    .profile line (don't forget the & at the end); I put this as the end of my .profile.

    # start media tomb
    mediatombstart &
    

    There is probably a better way but this seems to work.  Maybe this will help someone else.

     
  • I have my files added by inotify, and lost my database too.

    Any progress on fixing this?

     
  • Jin
    Jin
    2012-11-11

    Are you sure that your database is located in persistent storage and not on some RAM drive / in a volatile directory?