Luckily this proved to be pretty straight forward:
- using AWS web console, create a new volume and attach it to my instance (while instance is shutdown) - the new volume is attached as /dev/sdb
 - start up the instance, ssh in and format new volume: mkfs.ext3 /dev/sdb
 - mkdir mount point, eg /pgdata
 - vim /etc/fstab, adding:
/dev/sdb /pgdata ext3 defaults 1 1 - mount /pgdata
 - chown postgres:postgres /pgdata/
 - refer to this handy blog post
 - service postgresql stop
 - cp -R /var/lib/pgsql/data /pgdata/
 - Wait...
 - vim /etc/init.d/postgresql and setting PGDATA to /pgdata
 - service postgresql start
 
No comments:
Post a Comment