Re: [PERFORM] backup/restore - another area.
От | Jeff |
---|---|
Тема | Re: [PERFORM] backup/restore - another area. |
Дата | |
Msg-id | 20031017074553.655fa2c9.threshar@torgo.978.org обсуждение исходный текст |
Ответ на | Re: [PERFORM] backup/restore - another area. ("Donald Fraser" <demolish@cwgsy.net>) |
Список | pgsql-admin |
On Thu, 16 Oct 2003 23:35:48 +0100 "Donald Fraser" <demolish@cwgsy.net> wrote: > > Since this seems to work for you, > would you be kind enough to post the shell script for doing the > snapshot with LVM. > Ahh, I posted it to -perform. Guess it didn't make it here. I have a 2 disk striped LVM as /dev/postgresql/pgdata Here's what I do: lvcreate -L4000M -s -n pg_backup /dev/postgres/pgdata mount /dev/postgres/pg_backup /pg_backup tar cf - /pg_backup | gzip -1 > /squeegit/mb.backup umount /pg_backup; lvremove -f/dev/postgres/pg_backup; The key is that -L that tells it how big to make htings. If your -L is smaller than the actual size of the volume you'll get corruption (as I found out). The restore is to simply take pg down, rm $PGDATA and untar mb.backup into $PGDATA, start up PG and thats it. Godo luck - be sure to test it out first! -- Jeff Trout <jeff@jefftrout.com> http://www.jefftrout.com/ http://www.stuarthamm.net/
В списке pgsql-admin по дате отправления: