6.x에서 한일입니다.
(현제 데몬이 돌구 있습니다.)
su postgres
cd
pg_dumpall > db.out
==================================================================
7.x에서 한일입니다.
(현제 데몬이 돌구 있습니다.)
파일(db.out)을 받았습니다.
su postgres
bash-2.05a$cd
bash-2.05a$ psql -e template1 < db.out
You are now connected to database template1.
select datdba into table tmp_pg_shadow from pg_database where datname = 'template1';
SELECT
delete from pg_shadow where usesysid <> tmp_pg_shadow.datdba;
DELETE 2
drop table tmp_pg_shadow;
DROP
copy pg_shadow from stdin;
You are now connected to database template1 as user postgres.
create database goldi with encoding='SQL_ASCII';
ERROR: CREATE DATABASE: database "goldi" already exists
You are now connected to database goldi as user postgres.
You are now connected as new user postgres.
CREATE SEQUENCE "number" start 246 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
ERROR: Relation 'number' already exists
SELECT nextval ('number');
nextval
---------
249
(1 row)
REVOKE ALL on "number" from PUBLIC;
REVOKE
GRANT INSERT,UPDATE,DELETE,SELECT on "number" to "postgres";
GRANT
GRANT INSERT,UPDATE,DELETE,SELECT on "number" to "www";
GRANT
\connect: FATAL 1: IDENT authentication failed for user "root"
bash-2.05a$
==================================================================
모르는것을 빠른 시간안에 할려고 하니까 참 힘이듭니다. ^^
Q & A 게시판을 참고하다가 글을 올립니다.
|