general fear question about move PGDATA from one Disc to another
От | Aleksandar Lazic |
---|---|
Тема | general fear question about move PGDATA from one Disc to another |
Дата | |
Msg-id | 92664bdf72b73e7ef0c987bc167611c9@none.at обсуждение исходный текст |
Ответы |
Re: general fear question about move PGDATA from one Disc
to another
|
Список | pgsql-general |
Dear listmembers, I need to move /var/lib/postgresql/8.4/main from the / partion to another disc. Based on the http://wiki.postgresql.org/wiki/Simple_Configuration_Recommendation#File_System_Layouts I plan the following. 0.) Mount new pgroot, are there any hints for the mount command? mount -t ext4 -o noatime,nodiratime,nodev,noexec,nosuid /dev/sde1 /pgroot output from mount /dev/sde1 on /pgroot type ext4 (rw,nosuid,nodev,noexec,noatime,nodiratime,barrier=1,data=ordered) 1.) create a full backup of the current DB /usr/bin/pg_dumpall --file=/tmp/backup_before_part_move.tar --format=tar --oids --verbose --username=postgres 2.) Stop the database and the Apps which use the DB /etc/init.d/postgresql stop .... 3.) copy the current /var/lib/postgresql/8.4/main to the new dir as user postgres cd /var/lib/postgresql/ tar cvf - . | (cd /pgroot/pgdata && tar xvf -) 4.) sync filesystems sync 5.) change data_directory to /pgroot/pgdata/8.4/main 6.) Start postgres /etc/init.d/postgresql start OS: ubuntu 11.04 PG: postgresql-8.4 8.4.14-0ubuntu11.04 Please can anybody take a look about my planned process and tell me if I have forgotten something and maybe point me to the right Doc, thanks. Thanks for feedback. Best regards Aleks
В списке pgsql-general по дате отправления: