#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    2
    Rep Power
    0

    Moving Data Directory


    Hi Everyone,

    So I've already read countless forum entries on this very subject but I still can't seem to get this to work.

    Basically I need to move my postgresql database to an external hard drive as it contains a good deal of data and is only going to grow more and more, which is the reason I got a 4TB external HDD to store everything on. So I changed the data_directory variable in etc/postgresql/8.4/main/postgresql.conf and tried restarting but I get an error, cannot open log file.

    I'm running postgres 8.4 and Debian. Everything works fine when I revert it to the default directory but the computer hard drive will fill up quickly and I would like to get this onto the external HDD asap.

    Thanks!
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7171
    Check to see whether you're running AppArmor, if you are, it is probably restricting Postgresql to your original filesystem.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    2
    Rep Power
    0
    Thanks for the reply. It doesn't appear I'm running AppArmor. I searched the whole file system for it and tried checking it in the running processes - no sign of it anywhere.

IMN logo majestic logo threadwatch logo seochat tools logo