当前位置: 首页 > news >正文

手机怎么打开自己做的网站app搜索优化

手机怎么打开自己做的网站,app搜索优化,无限资源免费观看大全,互联网舆情研究中心零、前言 本文是基于阿里云ECS服务器进行的实践操作,操作系统版本:Red Hat Enterprise Linux 7 PG数据库版本:PostgresSql 15 PG安装方式:yum 由于本人新接触pg数据,本次也是出于好奇,就对pg数据库的pg_du…

零、前言

本文是基于阿里云ECS服务器进行的实践操作,操作系统版本:Red Hat Enterprise Linux 7
PG数据库版本:PostgresSql 15
PG安装方式:yum
由于本人新接触pg数据,本次也是出于好奇,就对pg数据库的pg_dump备份操作进行了一次试验,操作过程可能有些不当,敬请谅解。
本文只供留做笔记或新手作为参考,不作为技术指导类文章。操作需具备pg基础及linux基本操作知识。

一、备份

--- 1.1、首先新建备份sql输出的目录并授权
# root用户操作
[root@wstech ~]# mkdir -p /usr/pgsql-15/backup--- 1.2、备份操作
-- 切换postgres用户
su - postgrescd /usr/pgsql-15/bin
--- 1.3、执行备份:注意文件目录——可执行命令的目录以及输出备份文件的目录,不然恢复的时候找不到。另外需要注意输出目录的磁盘余量。
-bash-4.2$ ./bin/pg_dump mydb > ./backup/mydb.sql
--- 1.4、查看文件
-bash-4.2$ cd pgsql-15/backup/
-bash-4.2$ ll
total 4
-rw-r--r-- 1 postgres postgres 1073 Aug 26 23:42 mydb.sql
--- 1.5、查看备份文件sql文本内容
-bash-4.2$ cat mydb.sql
--
-- PostgreSQL database dump
---- Dumped from database version 15.4
-- Dumped by pg_dump version 15.4SET 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;SET default_tablespace = '';SET default_table_access_method = heap;--
-- Name: weather_info; Type: TABLE; Schema: public; Owner: postgres
--CREATE TABLE public.weather_info (city character varying(80),temp_lo integer,temp_hi integer,prcp real,date date
);ALTER TABLE public.weather_info OWNER TO postgres;--
-- Data for Name: weather_info; Type: TABLE DATA; Schema: public; Owner: postgres
--COPY public.weather_info (city, temp_lo, temp_hi, prcp, date) FROM stdin;
US      46      50      0.25    1994-11-27
UK      43      57      0       1994-11-29
Hayward 37      54      \N      1994-11-29
\.--
-- PostgreSQL database dump complete
----- 1.6、删除数据库mydb
-bash-4.2$ dropdb mydb;
-bash-4.2$ psql
psql (15.4)
Type "help" for help.
--- 1.7、查看是否删除成功(已经没有了,说明删除成功了)
postgres=# \lList of databasesName    |  Owner   | Encoding |   Collate   |    Ctype    | ICU Locale | Locale Provider |   Access privileges
-----------+----------+----------+-------------+-------------+------------+-----------------+-----------------------dbname    | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |            | libc            |dengyu    | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |            | libc            |postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |            | libc            |template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |            | libc            | =c/postgres          +|          |          |             |             |            |                 | postgres=CTc/postgrestemplate1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |            | libc            | =c/postgres          +|          |          |             |             |            |                 | postgres=CTc/postgres
(5 rows)

在这里插入图片描述

二、恢复

--- 2.1、新建目标库newdb数据库
-bash-4.2$ createdb newdb;
--- 2.2、进入psql可执行文件目录(bin目录)
-bash-4.2$ cd /usr/pgsql-15/
-bash-4.2$ ls
backup  bin  lib  share
--- 2.3、恢复
-- 执行恢复(注意可执行文件路径及备份文件路径)
-bash-4.2$ ./bin/psql newdb < ./backup/mydb.sql
SET
SET
SET
SET
SETset_config
------------(1 row)SET
SET
SET
SET
SET
SET
CREATE TABLE
ALTER TABLE
COPY 3
-bash-4.2$--- 2.4、恢复完成后链接数据库
-bash-4.2$ psql
psql (15.4)
Type "help" for help.
--- 2.5、切换到newdb数据库
postgres=# \c newdb
You are now connected to database "newdb" as user "postgres".
--- 2.6、看数据库中表信息
newdb=# \dList of relationsSchema |     Name     | Type  |  Owner
--------+--------------+-------+----------public | weather_info | table | postgres
(1 row)
--- 2.7、查询newdb中恢复的表weather_info的数据
newdb=# select * from weather_info;city   | temp_lo | temp_hi | prcp |    date
---------+---------+---------+------+------------US      |      46 |      50 | 0.25 | 1994-11-27UK      |      43 |      57 |    0 | 1994-11-29Hayward |      37 |      54 |      | 1994-11-29
(3 rows)newdb=#

在这里插入图片描述
在这里插入图片描述

http://www.shuangfujiaoyu.com/news/7610.html

相关文章:

  • 如果做网站需要多少钱泰州百度seo
  • h5页面的制作工具汕头seo推广外包
  • 专业做网站的公司衡阳seo
  • 局域网做网站 内网穿透百度一下知道首页
  • 上海高端定制网站公司网站推广优化招聘
  • 免费的网站登录模板下载怎样能在百度上搜索到自己的店铺
  • 培训教育类网站模板网络营销公司哪家好
  • wordpress建企业网站教程百度引流推广费用多少
  • 网站 tag标签长沙百度推广公司电话
  • 永川做网站铜仁搜狗推广
  • 怎么做英文网站西青seo
  • 全球网站域名推广技术
  • 育儿网网站开发网站关键词优化推广哪家快
  • 怎么设置网站默认首页培训学校怎么招生
  • 做网站的app建站系统有哪些
  • 网站如何做中英文切换百度推广客户端下载网址
  • 渭南网站建设公司站长工具关键词排名怎么查
  • 网站开发需求分析范本wordpress免费建站
  • 深圳网站建设卓企专业网站优化推广
  • 望城城乡建设委员会网站seo优化报告
  • cdr做图时怎么找到网站的360网站推广
  • 商城类网站如何做seo今日头条郑州头条新闻
  • 专门做汽配的网站76人vs猛龙
  • 网站套模板什么意思深圳网站建设三把火科技
  • 建设微信商城网站制作网站推广的常用方法有哪些?
  • 电子表格做网站框架seo关键技术有哪些
  • 做软装什么网站可以网络推广运营推广
  • 济宁网站建设常用解决方案疫情防控最新政策
  • 找人帮你做ppt的网站吗奶盘seo伪原创工具
  • html5网站设计欣赏网络公司是做什么的