'2020/02/04'에 해당되는 글 3건

  1. 2020.02.04 pg_dump -n 으로 특정 스키마만 백업하기
  2. 2020.02.04 drop database와 postgres
  3. 2020.02.04 centos7 minimal / X11 사용하기

 

-n schema
--schema=schema
Dump only schemas matching schema; this selects both the schema itself, and all its contained objects. When this option is not specified, all non-system schemas in the target database will be dumped. Multiple schemas can be selected by writing multiple -n switches. Also, the schema parameter is interpreted as a pattern according to the same rules used by psql's \d commands (see Patterns), so multiple schemas can also be selected by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent the shell from expanding the wildcards; see Examples.

Note: When -n is specified, pg_dump makes no attempt to dump any other database objects that the selected schema(s) might depend upon. Therefore, there is no guarantee that the results of a specific-schema dump can be successfully restored by themselves into a clean database.

Note: Non-schema objects such as blobs are not dumped when -n is specified. You can add blobs back to the dump with the --blobs switch.

-N schema
--exclude-schema=schema
Do not dump any schemas matching the schema pattern. The pattern is interpreted according to the same rules as for -n. -N can be given more than once to exclude schemas matching any of several patterns.

When both -n and -N are given, the behavior is to dump just the schemas that match at least one -n switch but no -N switches. If -N appears without -n, then schemas matching -N are excluded from what is otherwise a normal dump.

[링크 : https://www.postgresql.org/docs/9.1/app-pgdump.html]

[링크 : https://stackoverflow.com/questions/14486241/how-can-i-export-the-schema-of-a-database-in-postgresql]

[링크 : https://dba.stackexchange.com/questions/53185/postgresql-how-to-backup-only-one-schema-from-a-database-and-restore-it-on-anot]

 

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

sql에서 null 비교  (0) 2020.02.07
ER 다이어그램 식별 / 비식별  (0) 2020.02.07
drop database와 postgres  (0) 2020.02.04
union / intersect / minus  (0) 2020.01.22
one to one , one to only one  (0) 2020.01.17
Posted by 구차니

postgresql은 WAL로 인해서 table을 drop 해도 용량이 늘어나고

full vacuum을 통해서 공간을 줄일수 있다.

 

유일한 예외(?)가 drop database

하드 디스크 거의 100% 채워서 뻗은 시스템을 이제야 복구하는데

 

drop database [database_name]

해주면서 df -h 를 보고 있노라니 용량이 쑥쑥 줄어든다.

 

아무튼 공간 부족해서 터져 나간건 복구도 힘들구나.. 라는걸 깨닫는 중

Posted by 구차니
Linux/centos2020. 2. 4. 12:57

패키지 설치

[링크 : https://www.lesstif.com/pages/viewpage.action?pageId=6979708]

 

 

sshd_config 설정

[링크 : https://stackoverflow.com/questions/38961495/x11-forwarding-request-failed-on-channel-0]

AllowTcpForwarding yes 
#GatewayPorts no 
X11Forwarding yes 
X11DisplayOffset 10 
#X11UseLocalhost no 
#PermitTTY yes 
PrintMotd no 
PrintLastLog yes 
TCPKeepAlive yes 
#UseLogin no 
UsePrivilegeSeparation sandbox 

[링크 : https://sonumb.tistory.com/79]

[링크 : https://harryp.tistory.com/684]

'Linux > centos' 카테고리의 다른 글

centos 8.2 네트워크 설정  (0) 2020.12.02
ls 퍼미션에 .의 의미  (0) 2020.04.01
리눅스 로그인 실패 로그  (2) 2019.07.07
centos7 USB 설치 중 /dev/root dose not exist 에러  (0) 2019.07.02
httpd + php + selinux..  (0) 2019.03.20
Posted by 구차니