× Warning! This forum is in archival status. New contributions may not work.
Probably A Total N00b Question BUT We're Having Trouble Restoring A Database After a Clean Install
  • We've been using Airtime for a while and have become fairly familiar with installing and restoring from the command line

    We are now running into problems on restoring the database and getting a Permission denied message

    The only difference is we are installing Airtime on a FRESH install of Pinguy (Ubuntu 12.04 64 bit)

    Here are the steps

    We backed up the database
    sudo -u postgres pg_dumpall | gzip -c > airtime-backup.2.1.3.full.gz

    Grabbed and un-tarr'd the proggie

    gunzip airtime-backup.2.1.3.full.gz

    Ran the install

    sudo ~/airtime-2.1.3/install_full/ubuntu/airtime-full-install -r

    The install checks out OK

    *** Verifying your system environment, running airtime-check-system ***
    AIRTIME_STATUS_URL             = http://localhost:80/api/status/format/json/api_key/%%api_key%%
    AIRTIME_SERVER_RESPONDING      = OK
    KERNEL_VERSION                 = 3.2.0-25-generic
    MACHINE_ARCHITECTURE           = x86_64
    TOTAL_MEMORY_MBYTES            = 2051056
    TOTAL_SWAP_MBYTES              = 3119600
    AIRTIME_VERSION                = 2.1.3
    OS                             = Ubuntu 12.04 LTS x86_64
    CPU                            = Intel(R) Atom(TM) CPU D510   @ 1.66GHz
    WEB_SERVER                     = Apache/2.2.22 (Ubuntu)
    PLAYOUT_ENGINE_PROCESS_ID      = 5468
    PLAYOUT_ENGINE_RUNNING_SECONDS = 13
    PLAYOUT_ENGINE_MEM_PERC        = 0.7%
    PLAYOUT_ENGINE_CPU_PERC        = 0.0%
    LIQUIDSOAP_PROCESS_ID          = 5471
    LIQUIDSOAP_RUNNING_SECONDS     = 13
    LIQUIDSOAP_MEM_PERC            = 0.8%
    LIQUIDSOAP_CPU_PERC            = 3.9%
    MEDIA_MONITOR_PROCESS_ID       = 5412
    MEDIA_MONITOR_RUNNING_SECONDS  = 13
    MEDIA_MONITOR_MEM_PERC         = 0.6%
    MEDIA_MONITOR_CPU_PERC         = 0.4%
    RABBITMQ_PROCESS_ID            = 1915
    RABBITMQ_RUNNING_SECONDS       = 899
    RABBITMQ_MEM_PERC              = 1.3%
    RABBITMQ_CPU_PERC              = 0.0%

    -- Your installation of Airtime looks OK!

    ******************************* Install Complete *******************************

    We clear the database as a precaution as we always have

    sudo -u postgres dropdb airtime  ## just In case

    The restore the database

    sudo -u postgres psql -f airtime-backup.2.1.3.full postgres

    This is where we get the error "permission denied"

    Any suggestions?
  • 5 Comments sorted by
  • I think the problem is that you are restoring to the postgres db instead of the airtime db.

    Try 

    sudo -u postgres psql -f airtime-backup.2.1.3.full airtime 
    Airtime Pro Hosting: http://airtime.pro
  • I did try that too and getting the same "permission denied"
  • Never mind

    When I moved the files over from the backup I needed to change the permission/owner (chown)

    Duh!

    Thanks!

    Post edited by Bob Zurunclε at 2012-09-24 13:19:54
  • However, there is a problem...

    All the playlists are empty

    Would that have to do with the mount point being specific and needing to be the EXACT as before?

    I've replicated the exact path names/mount point names and still nothing...

    All the files have appeared and play fine

    Thanks Martin!
    Post edited by Bob Zurunclε at 2012-09-24 22:50:26
  • Again disregard...

    I just did a complete flush and reinstall of airtime and the database
    The tracks repopulated the play lists

    then ran

    sudo -u postgres psql airtime -c "UPDATE cc_files set file_exists = 't'"

    Thanks!