houhouhia1 2020-02-27 21:26 采纳率: 0%
浏览 514
已结题

Postgresql数据库恢复

有一个名为backupfiel的Postgresql备份,如下

--
-- PostgreSQL database dump
--

-- Dumped from database version 9.5.10
-- Dumped by pg_dump version 9.5.10

SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;

SET search_path = xml, pg_catalog;

--
-- Data for Name: t_sys_data; Type: TABLE DATA; Schema: xml; Owner: -
--

COPY t_sys_data (sys_data_id, copyright) FROM stdin;
1   <copyright>User acknowledges that Fairview Research and its third party providers retain all right, title and interest in and to this xml under applicable copyright laws. User acquires no ownership rights to this xml including but not limited to its format. User hereby accepts the terms and conditions of the License Agreement.</copyright>
\.


--
-- Name: t_sys_data_sys_data_id_seq; Type: SEQUENCE SET; Schema: xml; Owner: -
--

SELECT pg_catalog.setval('t_sys_data_sys_data_id_seq', 1, false);


--
-- PostgreSQL database dump complete
--

如何恢复到Postgresql?我试过用下面的代码。

psql -U postgres database < backupfile

但是返回错误:“t_sys_data” does not exist

这个表我已经建立在数据库database里面了

  • 写回答

1条回答 默认 最新

  • threenewbee 2020-02-27 22:16
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算