暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

PostgreSQL基础 pg_dumpall 本地逻辑备份

CentOS 7.6.1810
postgresql 14.4

pg_dumpall 本地逻辑备份

[postgres@localhost ~]$ pg_dumpall -U postgres > dumpall_07161818.sql [postgres@localhost ~]$ ll total 4 -rw-rw-r--. 1 postgres postgres 2218 Jul 16 18:18 dumpall_07161818.sql
[postgres@localhost ~]$ cat dumpall_07161818.sql -- -- PostgreSQL database cluster dump -- SET default_transaction_read_only = off; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; -- -- Roles -- CREATE ROLE postgres; ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLICATION BYPASSRLS PASSWORD 'SCRAM-SHA-256$4096:rRowCHrSpVzy07+SPVQBuA==$Mc5IPI01D2ZsZZzS55Q1ykhw5qMktbDWg3u5An3MbrY=:jjv/BGC0xcpHP4ZE9PsNvuKRxYTTKBsZUHCJbhq8z28='; -- -- Databases -- -- -- Database "template1" dump -- \connect template1 -- -- PostgreSQL database dump -- -- Dumped from database version 14.4 -- Dumped by pg_dump version 14.4 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; SET row_security = off; -- -- PostgreSQL database dump complete -- -- -- Database "postgres" dump -- \connect postgres -- -- PostgreSQL database dump -- -- Dumped from database version 14.4 -- Dumped by pg_dump version 14.4 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; SET row_security = off; -- -- Name: product; Type: TYPE; Schema: public; Owner: postgres -- CREATE TYPE public.product AS ( pro_id integer, pro_count integer ); ALTER TYPE public.product OWNER TO postgres; SET default_tablespace = ''; SET default_table_access_method = heap; -- -- Name: table_tf; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public.table_tf ( col_t boolean, col_f boolean ); ALTER TABLE public.table_tf OWNER TO postgres; -- -- Data for Name: table_tf; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY public.table_tf (col_t, col_f) FROM stdin; t f t f t f t f t f t f t f \N \N \. -- -- PostgreSQL database dump complete -- -- -- PostgreSQL database cluster dump complete --

学习资料


欢迎各位同学一起来交流学习心得!

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

文章被以下合辑收录

评论