<<編程基礎(chǔ)-語言SQL.Git.Docker>>

<<編程基礎(chǔ)-語言SQL.Git.Docker>>
SQL.PLSQL
http://docs.pythontab.com
https://springcloud.cc/
https://echo.labstack.com/
https://beego.me/
http://flask.pocoo.org/
https://www.programcreek.com/
概述: 主要存放新產(chǎn)品研發(fā)的架構(gòu)部署位岔,架構(gòu)解決方案酌媒,持續(xù)集成放吩,持續(xù)部署和自動化的一些資料等。
############################################################################
use log_dev database, change your table name and timestamp day value, and excute it
select log_cd,func_cd,log_dhms from log_operate_1709 where created_date >= to_timestamp('2017-09-11', 'yyyy-mm-dd')
and log_cd <> '日志類型' order BY created_date DESC;
select log_cd,func_cd,log_dhms,infurl,infnm from log_pdt_data_1709 where created_date >= to_timestamp('2017-09-11', 'yyyy-mm-dd')
and log_cd <> '日志類型' ORDER BY created_date DESC;
--testing log SQL statements
select log_cd,func_cd,log_dhms,from_ip from log_operate_1709 where
created_date >= to_timestamp('2017-09-14', 'yyyy-mm-dd')
and log_cd <> '日志類型' order BY created_date DESC;
select log_cd,func_cd,log_dhms,infurl,infnm,from_ip from log_pdt_data_1709 where
created_date >= to_timestamp('2017-09-14', 'yyyy-mm-dd')
and log_cd <> '日志類型' ORDER BY created_date DESC;
--count log_operate_1709 and log_pdt_data_1709 tables current date record
select count(log_cd) from log_operate_1709 where log_cd <> '日志類型' and
created_date >= to_timestamp('2017-09-14', 'yyyy-mm-dd');
select count(log_cd) from log_pdt_data_1709 where log_cd <> '日志類型' and
created_date >= to_timestamp('2017-09-14', 'yyyy-mm-dd');
#################################################################################################################
白盒測試 需求用例 名詞解釋 houseblock鎖房 RT+ 只改房含 RT* 不管改不改房含 只要改了房價 noshow 預(yù)定未到 結(jié)賬folio 就是結(jié)賬賬單-已結(jié)賬下面 下個+下面的
001.房價=====================================================
每日房價記錄數(shù)與住店時間一致
houseblock記錄數(shù)與住店時間一致
每日收取的房含要出現(xiàn)在每日房含表中的每一天妄讯,首日房含只能出現(xiàn)在首日
一期所有每日房價的價格代碼诈乒、折扣一樣
RT+只能有一套房含
RT只能有一套房含,且每日價格設(shè)定一樣
002.預(yù)訂=====================================================
沒有來期大于等于今日的noshow賬戶
沒有離期小于今日的在店賬戶
沒有來期小于今日的預(yù)訂賬戶
沒有來期大于今日的在店賬戶
每個賬戶至少有一個住店客人,且賬戶表里的住店客人ID對應(yīng)的存在
每個賬戶只能有一個預(yù)訂人,且賬戶表里的預(yù)訂人ID對應(yīng)的存在
003.賬務(wù)====================================================
客賬交易金額與賬務(wù)明細(xì)金額一致征讲,12個細(xì)項金額也一致
賬單的余額為0
已結(jié)賬戶余額為0
結(jié)賬folio里的幾個金額與明細(xì)一致
轉(zhuǎn)賬folio里的幾個金額與明細(xì)一致
004.客房====================================================
空房態(tài)沒有在店賬戶
占用房態(tài)必有在店賬戶
維修房態(tài)有對應(yīng)的維修記錄
houseblock
###################################################################
白盒測試 by 20170622
房價 housingprice_test001 housingprice_test002 housingprice_test003
1.每日房價記錄數(shù)與住店時間一致
SELECT country, SUM( CASE WHEN sex = '1' THEN population ELSE 0 END), --男性人口 SUM( CASE WHEN sex = '2' THEN population ELSE 0 END) --女性人口 FROM Table_A GROUP BY country
2.houseblock記錄數(shù)與住店時間一致
select * from emp where empno=7369 for update;
3.每日收取的房含要出現(xiàn)在每日房含表中的每一天,首日房含只能出現(xiàn)在首日
select * from emp where empno=7369 for update;
4.一期所有每日房價的價格代碼、折扣一樣
select * from emp where empno=7369 for update;
5.RT+只能有一套房含
select * from emp where empno=7369 for update;
6.RT
只能有一套房含饿肺,且每日價格設(shè)定一樣
select * from emp where empno=7369 for update;
7.每日房含12個分項的合計與每日房價的一致
select * from emp where empno=7369 for update;

預(yù)訂 reserve_test001 reserve_test002
1.沒有來期大于等于今日的noshow賬戶
SELECT arr_dt,dpt_dt,acct_no,resv_no FROM rsv_account WHERE acct_stus='NSW' AND arr_dt>今日
2.沒有離期小于今日的在店賬戶
SELECT arr_dt,dpt_dt,acct_no,resv_no FROM rsv_account WHERE acct_stus='STY' AND dpt_dt<今日
3.沒有來期小于今日的預(yù)訂賬戶
SELECT arr_dt,dpt_dt,acct_no,resv_no FROM rsv_account WHERE acct_stus='RSV' AND arr_dt<今日
4.沒有來期大于今日的在店賬戶

SELECT arr_dt,dpt_dt,acct_no,resv_no FROM rsv_account WHERE acct_stus='STY' AND arr_dt>今日
5.每個賬戶至少有一個住店客人,且賬戶表里的住店客人ID對應(yīng)的存在

SELECT resv_no,acct_no,acct_stus FROM rsv_account WHERE acct_stus IN ('RSV','STY','WAT') AND resv_no NOT IN ( SELECT DISTINCT(M.resv_no) FROM rsv_account M INNER JOIN rsv_account_guest D ON M.resv_no=D.resv_no AND M.acct_no=D.acct_no WHERE acct_stus IN ('RSV','STY','WAT') AND guest_flg='RE' ORDER BY M.resv_no)
6.每個賬戶只能有一個預(yù)訂人盾似,且賬戶表里的預(yù)訂人ID對應(yīng)的存在

(SELECT guest_id FROM rsv_account m INNER JOIN rsv_account_guest d ON m.resv_no=d.resv_no AND m.bkguest_id=d.guest_id WHERE acct_stus IN ('RSV','STY','WAT') AND guest_flg='BK'
ORDER BY m.resv_no,d.acct_no)
SELECT acct_stus,resv_no,acct_no FROM rsv_account WHERE acct_stus IN ('RSV','STY','WAT') AND acct_no IN ( SELECT d.acct_no FROM rsv_account m INNER JOIN rsv_account_guest d ON m.resv_no=d.resv_no AND m.acct_no=d.acct_no WHERE acct_stus IN ('RSV','STY','WAT') AND guest_flg='BK' GROUP BY d.acct_no HAVING COUNT(*)>1)

賬務(wù) financial_test001 financial_test002

1.客賬交易金額與賬務(wù)明細(xì)金額一致敬辣,12個細(xì)項金額也一致
金額一致:
SELECT * from (SELECT mtrn_id,SUM(trntot_amt) as amt1 FROM hpt_fin_transaction GROUP BY mtrn_id) A, (SELECT trn_id,SUM(trn_amt) as amt2 FROM hpt_fin_transaction_jrnl WHERE jrnl_typ='REVN' GROUP BY trn_id) B WHERE A.mtrn_id=B.trn_id AND amt1<>amt2
細(xì)項一致:
SELECT * FROM (SELECT mtrn_id,acct_no,room_num,trn_cd,trn_drpt,trntot_amt AS amt1,trn_net+trn_tax1+trn_tax2+trn_tax3+trn_tax4+trn_tax5+trnsvc_net+trnsvc_tax1+trnsvc_tax2+trnsvc_tax3+trnsvc_tax4+trnsvc_tax5 AS amt2 FROM hpt_fin_transaction) A WHERE A.amt1<>A.amt2
2.賬單的余額為0
SELECT acct_no,bill_no,SUM(trntot_amt) from hpt_fin_transaction WHERE COALESCE(bill_no,'')<>'' GROUP BY acct_no,bill_no HAVING SUM(trntot_amt)>0 ORDER BY acct_no
3.已結(jié)賬戶余額為0
SELECT a.acct_no,SUM(trntot_amt) from rsv_account a LEFT JOIN hpt_fin_transaction t ON a.acct_no=t.acct_no WHERE a.acct_stus='OUT' GROUP BY a.acct_no HAVING SUM(trntot_amt)>0
4.結(jié)賬folio里的幾個金額與明細(xì)一致
SELECT F.acct_no,F.folio_no,credit_amt,debit_amt,check_amt,T.acct_no,T.bill_no,T.normal,trnamt FROM hpt_fin_folio F LEFT JOIN (SELECT acct_no,bill_no,normal,sum(trntot_amt) AS trnamt FROM hpt_fin_transaction WHERE bill_no<>'' GROUP BY acct_no,bill_no,normal ORDER BY acct_no,bill_no) T ON F.acct_no=T.acct_no AND F.folio_no=T.bill_no WHERE F.folio_typ='BILL' AND COALESCE(credit_amt,0)<>COALESCE(debit_amt,0) OR CASE T.normal WHEN 'C' THEN COALESCE(debit_amt,0)<>trnamt WHEN 'D' THEN COALESCE(credit_amt,0)<>trnamt ELSE 1=1 END

5.轉(zhuǎn)賬folio里的幾個金額與明細(xì)一致
SELECT F.acct_no,F.folio_typ,F.folio_no,credit_amt,debit_amt,check_amt,J.trn_amt from hpt_fin_folio F LEFT JOIN (SELECT acct_no,pkgfolio_no,sum(trn_amt) AS trn_amt FROM hpt_fin_transaction_jrnl WHERE jrnl_typ='MOVE' GROUP BY acct_no,pkgfolio_no ORDER BY acct_no,pkgfolio_no) J ON F.acct_no=J.acct_no AND F.folio_no=J.pkgfolio_no WHERE F.folio_typ='MVIN' OR F.folio_typ='MVOUT' AND (COALESCE(credit_amt,0)+COALESCE(debit_amt,0)<>COALESCE(check_amt,0) OR COALESCE(check_amt,0)<>COALESCE(trn_amt,0))
SELECT F.acct_no,F.folio_typ,F.folio_no,credit_amt,debit_amt,check_amt,J.normal,J.trn_amt from hpt_fin_folio F LEFT JOIN (SELECT acct_no,pkgfolio_no,normal,sum(trn_amt) AS trn_amt FROM hpt_fin_transaction_jrnl WHERE jrnl_typ='MOVE' GROUP BY acct_no,pkgfolio_no,normal ORDER BY acct_no,pkgfolio_no,normal) J ON F.acct_no=J.acct_no AND F.folio_no=J.pkgfolio_no WHERE F.folio_typ='MVIN' OR F.folio_typ='MVOUT' AND CASE J.normal WHEN 'C' THEN COALESCE(credit_amt,0)<>J.trn_amt WHEN 'D' THEN COALESCE(debit_amt,0)<>J.trn_amt ELSE 1=1 END

客房 hotelroom_test001 hotelroom_test002
1.空房態(tài)沒有在店賬戶
SELECT arr_dt,dpt_dt,resv_no,acct_no,room_num FROM rsv_account WHERE acct_stus='STY' AND room_num IN (SELECT room_num FROM hpt_hk_room WHERE fo_room_stus='V')
2.占用房態(tài)必有在店賬戶
SELECT arr_dt,dpt_dt,resv_no,acct_no,room_num FROM rsv_account WHERE acct_stus='STY' AND room_num IN (SELECT room_num FROM hpt_hk_room WHERE fo_room_stus<>'O')
3.維修房態(tài)有對應(yīng)的維修記錄
SELECT room_num FROM hpt_hk_room WHERE room_stus='OOO' AND room_num NOT IN (SELECT room_num FROM hpt_hk_room_repair WHERE repair_typ='OOO' AND start_dt<=當(dāng)日 AND end_dt>=當(dāng)日)
apache-tomcat-9.0.0.M20

zookeeper-3.4.8

rabbitMq-3.6.1

erlang-18.3

redis-3.2.1

FastDFS-5.05

PostgreSQL 9.6.1

Node 6.9.1 NPM 3.10.10

[圖片上傳失敗...(image-ad7bda-1510734227417)]

PostgreSQL自帶一個客戶端pgAdmin,里面有個備份零院,恢復(fù)選項购岗,也能對數(shù)據(jù)庫進(jìn)行備份 恢復(fù)(還原),但最近發(fā)現(xiàn)數(shù)據(jù)庫慢慢龐大的時候门粪,經(jīng)常出錯喊积,備份的文件過程中出錯的幾率那是相當(dāng)大,手動調(diào)節(jié)灰常有限玄妈。所以一直尋找完美的備份恢復(fù)方案乾吻。

一: 純文件格式的腳本:

示例:

1. 只導(dǎo)出postgres數(shù)據(jù)庫的數(shù)據(jù)髓梅,不包括模式 -s

pg_dump -U postgres -f /postgres.sql -s postgres(數(shù)據(jù)庫名)

2. 導(dǎo)出postgres數(shù)據(jù)庫(包括數(shù)據(jù))

pg_dump -U postgres -f /postgres.sql postgres(數(shù)據(jù)庫名)

3. 導(dǎo)出postgres數(shù)據(jù)庫中表test01的數(shù)據(jù)

create database "test01" with owner="postgres" encoding='utf-8';(單引號,雙引號不能錯)

pg_dump -U postgres -f /postgres.sql -t test01 postgres(數(shù)據(jù)庫名)

4. 導(dǎo)出postgres數(shù)據(jù)庫中表test01的數(shù)據(jù),以insert語句的形式

pg_dump -U postgres -f /postgres.sql -t test01 --column-inserts postgres(數(shù)據(jù)庫名)

5. 恢復(fù)數(shù)據(jù)到bk01數(shù)據(jù)庫

psql -U postgres -f /postgres.sql bk01

二绎签、 使用歸檔文件格式:

pg_restore

使用pg_restore純文本恢復(fù)純文本格式的腳本枯饿,無法恢復(fù)

[root@localhost postgres-9.3.5]# pg_restore -U postgres -d bk01 /mnt/hgfs/window&ubuntu\ shared\ folder/vendemo.sql

pg_restore: [archiver] input file appears to be a text format dump. Please use psql.

pg_restore和歸檔文件格式一起使用重建數(shù)據(jù)庫。

1. 先備份:

pg_dump -U postgres -F t -f /vendemo.tar vendemo 備份下來有800多k

. 恢復(fù):

pg_restore -U postgres -d bk01 /vendemo.tar

2. 先備份:

pg_dump -U postgres -F c -f /vendemo.tar vendemo 備份下來有300多k

. 恢復(fù):

pg_restore -U postgres -d bk01 /vendemo.tar

三诡必、 壓縮備份與恢復(fù):

處理

大數(shù)據(jù)

庫:

1. 使用壓縮的轉(zhuǎn)儲. 使用你熟悉的壓縮程序奢方,比如說 gzip。

. 先備份:

pg_dump -U postgres vendemo | gzip > /vendemo.gz 備份下來只有30多k

. 恢復(fù):

gunzip -c /vendemo.gz | psql -U postgres bk02

或者

cat /vendemo.gz | gunzip | psql -U postgres bk02

2. 使用 split爸舒。. split 命令允許你 你用下面的方法把輸出分解成

操作系統(tǒng)

可以接受的大小蟋字。 比如,讓每個塊大小為 1 兆字節(jié):

. 先備份:

pg_dump -U postgres -d vendemo | split -b 100k - /vend/vend

導(dǎo)出來的樣子是 vendaa 100k

vendab 100k

vendac 100k

vendad 16k

. 恢復(fù):

cat /vend/vend* | psql -U postgres bk02

夢里尋他千百度扭勉,伊人卻在燈火闌珊處...其實PostgreSQL內(nèi)置不少的工具鹊奖,尋找的備份恢復(fù)方案就在其中:pg_dump,psql涂炎。這兩個指令 在數(shù)據(jù)庫的安裝目錄下忠聚,比如我自己本地安裝的,路徑形如:C:\Program Files\PostgreSQL\9.5\唱捣;然后進(jìn)入到bin文件夾两蟀,會看到不少的exe文件,這就是PostgreSQL內(nèi)置的工具了震缭。里面會找到 pg_dump.exe垫竞,psql.exe兩個文件。我們怎么用他們蛀序?

用法:

備份數(shù)據(jù)庫

欢瞪,指令如下:

<pre class="sql" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">pg_dump -h 164.82.233.54 -U postgres databasename > C:\databasename.bak</pre>

開始-運行-cmd 彈出dos控制臺;然后 在控制臺里徐裸,進(jìn)入PostgreSQL安裝目錄bin下:

cd C:\Program Files\PostgreSQL\9.0\bin

最后執(zhí)行備份指令:

<pre class="sql" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">pg_dump -h 164.82.233.54 -U postgres databasename > C:\databasename.bak</pre>

指令解釋:如上命令遣鼓,pg_dump 是備份數(shù)據(jù)庫指令,164.82.233.54是數(shù)據(jù)庫的ip地址(必須保證數(shù)據(jù)庫允許外部訪問的權(quán)限哦~)重贺,當(dāng)然本地的數(shù)據(jù)庫ip寫 localhost骑祟;postgres 是數(shù)據(jù)庫的用戶名;databasename 是數(shù)據(jù)庫名气笙。> 意思是導(dǎo)出到C:\databasename.bak文件里次企,如果沒有寫路徑,單單寫databasename.bak文件名潜圃,那么備份文件會保存在C: \Program Files\PostgreSQL\9.0\bin 文件夾里缸棵。

恢復(fù)數(shù)據(jù)庫 ,指令如下:

<pre class="sql" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">**psql -h localhost -U postgres -d databasename < C:\databasename.bak(測試沒有成功)

pg_restore.exe --host localhost --port 5432 --username "postgres" --dbname "symbolmcnew" --no-password --verbose "databasename.backup"(測試成功)** </pre>

指令解釋:如上命令谭期,psql是恢復(fù)數(shù)據(jù)庫命令堵第,localhost是要恢復(fù)到哪個數(shù)據(jù)庫的地址吧凉,當(dāng)然你可以寫上ip地址,也就是說能遠(yuǎn)程恢復(fù)(必須保證 數(shù)據(jù)庫允許外部訪問的權(quán)限哦~)踏志;postgres 就是要恢復(fù)到哪個數(shù)據(jù)庫的用戶阀捅;databasename 是要恢復(fù)到哪個數(shù)據(jù)庫。< 的意思是把C:\databasename.bak文件導(dǎo)入到指定的數(shù)據(jù)庫里针余。

以上所有的是針對windows而言的饲鄙,如果在linux下,會不會有效圆雁?

在linux里依然有效忍级。有一個值得注意的是:如果直接進(jìn)入PostgreSQL的安裝目錄bin下,執(zhí)行命令摸柄,可能會出現(xiàn) 找不到pg_dump颤练,psql?的現(xiàn)象既忆,我們在可以這樣:

備份

<pre class="sql" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">/opt/PostgreSQL/9.5/bin/pg_dump -h 164.82.233.54 -U postgres databasename > databasename.bak</pre>

恢復(fù)

<pre class="sql" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">/opt/PostgreSQL/9.5/bin/psql -h localhost -U postgres -d databasename < databasename.bak</pre>

##########################MYSQL DUMP Restore###############################

mysqldump命令式備份整個DB用的驱负。

<pre class="programlisting" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">shell> mysqldump *db_name* > *backup-file.sql*
</pre>

把備份的數(shù)據(jù)導(dǎo)入空數(shù)據(jù)庫的命令。

<pre class="programlisting" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">shell> mysql *db_name* < *backup-file.sql*
</pre>

或者下面的這個命令患雇。

<pre class="programlisting" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">shell> mysql -e "source */path-to-backup/backup-file.sql*" *db_name*</pre>

在使用上面的命令的時候有可能會報版本不對跃脊。

原因是Linux中mysql命令的版本和你想導(dǎo)入的那個數(shù)據(jù)庫的版本不一致。

變通做法是跑到數(shù)據(jù)庫的bin目錄下面苛吱。

<pre class="programlisting" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">sshell> ./mysqldump *db_name* > *backup-file.sql*</pre>

把備份的數(shù)據(jù)導(dǎo)入空數(shù)據(jù)庫的命令酪术。

<pre class="programlisting" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">shell> ./mysql *db_name* < *backup-file.sql*</pre>
apache-tomcat-9.0.0.M20

zookeeper-3.4.8

rabbitMq-3.6.1

erlang-18.3

redis-3.2.1

FastDFS-5.05

PostgreSQL 9.6.1

Node 6.9.1 NPM 3.10.10

[圖片上傳中...(image-2435c1-1510734229120-0)]

PostgreSQL自帶一個客戶端pgAdmin,里面有個備份翠储,恢復(fù)選項绘雁,也能對數(shù)據(jù)庫進(jìn)行備份 恢復(fù)(還原),但最近發(fā)現(xiàn)數(shù)據(jù)庫慢慢龐大的時候援所,經(jīng)常出錯庐舟,備份的文件過程中出錯的幾率那是相當(dāng)大,手動調(diào)節(jié)灰常有限住拭。所以一直尋找完美的備份恢復(fù)方案挪略。

一: 純文件格式的腳本:

示例:

1. 只導(dǎo)出postgres數(shù)據(jù)庫的數(shù)據(jù),不包括模式 -s

pg_dump -U postgres -f /postgres.sql -s postgres(數(shù)據(jù)庫名)

2. 導(dǎo)出postgres數(shù)據(jù)庫(包括數(shù)據(jù))

pg_dump -U postgres -f /postgres.sql postgres(數(shù)據(jù)庫名)

3. 導(dǎo)出postgres數(shù)據(jù)庫中表test01的數(shù)據(jù)

create database "test01" with owner="postgres" encoding='utf-8';(單引號滔岳,雙引號不能錯)

pg_dump -U postgres -f /postgres.sql -t test01 postgres(數(shù)據(jù)庫名)

4. 導(dǎo)出postgres數(shù)據(jù)庫中表test01的數(shù)據(jù),以insert語句的形式

pg_dump -U postgres -f /postgres.sql -t test01 --column-inserts postgres(數(shù)據(jù)庫名)

5. 恢復(fù)數(shù)據(jù)到bk01數(shù)據(jù)庫

psql -U postgres -f /postgres.sql bk01

二杠娱、 使用歸檔文件格式:

pg_restore

使用pg_restore純文本恢復(fù)純文本格式的腳本,無法恢復(fù)

[root@localhost postgres-9.3.5]# pg_restore -U postgres -d bk01 /mnt/hgfs/window&ubuntu\ shared\ folder/vendemo.sql

pg_restore: [archiver] input file appears to be a text format dump. Please use psql.

pg_restore和歸檔文件格式一起使用重建數(shù)據(jù)庫谱煤。

1. 先備份:

pg_dump -U postgres -F t -f /vendemo.tar vendemo 備份下來有800多k

. 恢復(fù):

pg_restore -U postgres -d bk01 /vendemo.tar

2. 先備份:

pg_dump -U postgres -F c -f /vendemo.tar vendemo 備份下來有300多k

. 恢復(fù):

pg_restore -U postgres -d bk01 /vendemo.tar

三摊求、 壓縮備份與恢復(fù):

處理

大數(shù)據(jù)

庫:

1. 使用壓縮的轉(zhuǎn)儲. 使用你熟悉的壓縮程序,比如說 gzip刘离。

. 先備份:

pg_dump -U postgres vendemo | gzip > /vendemo.gz 備份下來只有30多k

. 恢復(fù):

gunzip -c /vendemo.gz | psql -U postgres bk02

或者

cat /vendemo.gz | gunzip | psql -U postgres bk02

2. 使用 split睹簇。. split 命令允許你 你用下面的方法把輸出分解成

操作系統(tǒng)

可以接受的大小奏赘。 比如,讓每個塊大小為 1 兆字節(jié):

. 先備份:

pg_dump -U postgres -d vendemo | split -b 100k - /vend/vend

導(dǎo)出來的樣子是 vendaa 100k

vendab 100k

vendac 100k

vendad 16k

. 恢復(fù):

cat /vend/vend* | psql -U postgres bk02

夢里尋他千百度太惠,伊人卻在燈火闌珊處...其實PostgreSQL內(nèi)置不少的工具磨淌,尋找的備份恢復(fù)方案就在其中:pg_dump,psql凿渊。這兩個指令 在數(shù)據(jù)庫的安裝目錄下梁只,比如我自己本地安裝的,路徑形如:C:\Program Files\PostgreSQL\9.5\埃脏;然后進(jìn)入到bin文件夾搪锣,會看到不少的exe文件,這就是PostgreSQL內(nèi)置的工具了彩掐。里面會找到 pg_dump.exe构舟,psql.exe兩個文件。我們怎么用他們堵幽?

用法:

備份數(shù)據(jù)庫

狗超,指令如下:

<pre class="sql" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">pg_dump -h 164.82.233.54 -U postgres databasename > C:\databasename.bak</pre>

開始-運行-cmd 彈出dos控制臺;然后 在控制臺里朴下,進(jìn)入PostgreSQL安裝目錄bin下:

cd C:\Program Files\PostgreSQL\9.0\bin

最后執(zhí)行備份指令:

<pre class="sql" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">pg_dump -h 164.82.233.54 -U postgres databasename > C:\databasename.bak</pre>

指令解釋:如上命令努咐,pg_dump 是備份數(shù)據(jù)庫指令,164.82.233.54是數(shù)據(jù)庫的ip地址(必須保證數(shù)據(jù)庫允許外部訪問的權(quán)限哦~)殴胧,當(dāng)然本地的數(shù)據(jù)庫ip寫 localhost渗稍;postgres 是數(shù)據(jù)庫的用戶名;databasename 是數(shù)據(jù)庫名团滥。> 意思是導(dǎo)出到C:\databasename.bak文件里竿屹,如果沒有寫路徑,單單寫databasename.bak文件名灸姊,那么備份文件會保存在C: \Program Files\PostgreSQL\9.0\bin 文件夾里拱燃。

恢復(fù)數(shù)據(jù)庫 ,指令如下:

<pre class="sql" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">**psql -h localhost -U postgres -d databasename < C:\databasename.bak(測試沒有成功)

pg_restore.exe --host localhost --port 5432 --username "postgres" --dbname "symbolmcnew" --no-password --verbose "databasename.backup"(測試成功)** </pre>

指令解釋:如上命令厨钻,psql是恢復(fù)數(shù)據(jù)庫命令扼雏,localhost是要恢復(fù)到哪個數(shù)據(jù)庫的地址,當(dāng)然你可以寫上ip地址夯膀,也就是說能遠(yuǎn)程恢復(fù)(必須保證 數(shù)據(jù)庫允許外部訪問的權(quán)限哦~)诗充;postgres 就是要恢復(fù)到哪個數(shù)據(jù)庫的用戶;databasename 是要恢復(fù)到哪個數(shù)據(jù)庫诱建。< 的意思是把C:\databasename.bak文件導(dǎo)入到指定的數(shù)據(jù)庫里蝴蜓。

以上所有的是針對windows而言的,如果在linux下,會不會有效茎匠?

在linux里依然有效格仲。有一個值得注意的是:如果直接進(jìn)入PostgreSQL的安裝目錄bin下,執(zhí)行命令诵冒,可能會出現(xiàn) 找不到pg_dump凯肋,psql?的現(xiàn)象,我們在可以這樣:

備份

<pre class="sql" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">/opt/PostgreSQL/9.5/bin/pg_dump -h 164.82.233.54 -U postgres databasename > databasename.bak</pre>

恢復(fù)

<pre class="sql" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">/opt/PostgreSQL/9.5/bin/psql -h localhost -U postgres -d databasename < databasename.bak</pre>

##########################MYSQL DUMP Restore###############################

mysqldump命令式備份整個DB用的汽馋。

<pre class="programlisting" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">shell> mysqldump *db_name* > *backup-file.sql*
</pre>

把備份的數(shù)據(jù)導(dǎo)入空數(shù)據(jù)庫的命令侮东。

<pre class="programlisting" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">shell> mysql *db_name* < *backup-file.sql*
</pre>

或者下面的這個命令。

<pre class="programlisting" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">shell> mysql -e "source */path-to-backup/backup-file.sql*" *db_name*</pre>

在使用上面的命令的時候有可能會報版本不對豹芯。

原因是Linux中mysql命令的版本和你想導(dǎo)入的那個數(shù)據(jù)庫的版本不一致悄雅。

變通做法是跑到數(shù)據(jù)庫的bin目錄下面。

<pre class="programlisting" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">sshell> ./mysqldump *db_name* > *backup-file.sql*</pre>

把備份的數(shù)據(jù)導(dǎo)入空數(shù)據(jù)庫的命令铁蹈。

<pre class="programlisting" style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">shell> ./mysql *db_name* < *backup-file.sql*</pre>

######################################################################
Git GitFlow SVN
http://svnbook.red-bean.com/

##############################SVN 規(guī)范標(biāo)準(zhǔn)###################################

Subversion有一個很標(biāo)準(zhǔn)的目錄結(jié)構(gòu)宽闲,是這樣的。
比如項目是proj握牧,svn地址為<a rel="nofollow" style="color: rgb(53, 114, 176); text-decoration: none;">svn://proj/容诬,那么標(biāo)準(zhǔn)的svn布局是</a>

<pre style="margin: 10px 0px 0px; padding: 0px; font-family: ConfluenceInstalledFont, monospace; color: rgb(51, 51, 51); font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial;">svn://proj/
|
+-trunk
+-branches
+-tags</pre>

這是一個標(biāo)準(zhǔn)的布局,trunk為主開發(fā)目錄我碟,branches為分支開發(fā)目錄放案,tags為tag存檔目錄(不允許修改)姚建。但是具體這幾個目錄應(yīng)該如何使用矫俺,svn并沒有明確的規(guī)范,更多的還是用戶自己的習(xí)慣掸冤。

對于這幾個開發(fā)目錄厘托,一般的使用方法有兩種。我更多的是從軟件產(chǎn)品的角度出發(fā)(比如freebsd)稿湿,因為互聯(lián)網(wǎng)的開發(fā)模式是完全不一樣的铅匹。

第一種方法,使用trunk作為主要的開發(fā)目錄饺藤。

一般的包斑,我們的所有的開發(fā)都是基于trunk進(jìn)行開發(fā),當(dāng)一個版本/release開發(fā)告一段落(開發(fā)涕俗、測試罗丰、文檔、制作安裝程序再姑、打包等)結(jié)束后萌抵,代碼處于凍結(jié)狀態(tài)(人為規(guī)定,可以通過hook來進(jìn)行管理)。此時應(yīng)該基于當(dāng)前凍結(jié)的代碼庫绍填,打tag霎桅。當(dāng)下一個版本/階段的開發(fā)任務(wù)開始,繼續(xù)在trunk進(jìn)行開發(fā)讨永。

此時滔驶,如果發(fā)現(xiàn)了上一個已發(fā)行版本(Released Version)有一些bug,或者一些很急迫的功能要求卿闹,而正在開發(fā)的版本(Developing Version)無法滿足時間要求瓜浸,這時候就需要在上一個版本上進(jìn)行修改了。應(yīng)該基于發(fā)行版對應(yīng)的tag比原,做相應(yīng)的分支(branch)進(jìn)行開發(fā)插佛。

例如,剛剛發(fā)布1.0量窘,正在開發(fā)2.0雇寇,此時要在1.0的基礎(chǔ)上進(jìn)行bug修正。

按照時間的順序

  1. 1.0開發(fā)完畢蚌铜,代碼凍結(jié)
  2. 基于已經(jīng)凍結(jié)的trunk锨侯,為release1.0打tag
    此時的目錄結(jié)構(gòu)為
    svn://proj/
    +trunk/ (freeze)
    +branches/
    +tags/
    +tag_release_1.0 (copy from trunk)
  3. 2.0開始開發(fā),trunk此時為2.0的開發(fā)版
  4. 發(fā)現(xiàn)1.0有bug冬殃,需要修改囚痴,基于1.0的tag做branch
    此時的目錄結(jié)構(gòu)為
    svn://proj/
    +trunk/ ( dev 2.0 )
    +branches/
    +dev_1.0_bugfix (copy from tag/release_1.0)
    +tags/
    +release_1.0 (copy from trunk)
  5. 在1.0 bugfix branch進(jìn)行1.0 bugfix開發(fā),在trunk進(jìn)行2.0開發(fā)
  6. 在1.0 bugfix 完成之后审葬,基于dev_1.0_bugfix的branch做release等
  7. 根據(jù)需要選擇性的把dev_1.0_bugfix這個分支merge回trunk(什么時候進(jìn)行這步操作深滚,要根據(jù)具體情況)

這是一種很標(biāo)準(zhǔn)的開發(fā)模式,很多的公司都是采用這種模式進(jìn)行開發(fā)的涣觉。trunk永遠(yuǎn)是開發(fā)的主要目錄痴荐。

第二種方法,在每一個release的branch中進(jìn)行各自的開發(fā)官册,trunk只做發(fā)布使用生兆。
這種開發(fā)模式當(dāng)中,trunk是不承擔(dān)具體開發(fā)任務(wù)的膝宁,一個版本/階段的開發(fā)任務(wù)在開始的時候鸦难,根據(jù)已經(jīng)release的版本做新的開發(fā)分支,并且基于這個分支進(jìn)行開發(fā)员淫。還是舉上面的例子合蔽,這里面的時序關(guān)系是。

  1. 1.0開發(fā)满粗,做dev1.0的branch
    此時的目錄結(jié)構(gòu)
    svn://proj/
    +trunk/ (不擔(dān)負(fù)開發(fā)任務(wù) )
    +branches/
    +dev_1.0 (copy from trunk)
    +tags/
  2. 1.0開發(fā)完成辈末,merge dev1.0到trunk
    此時的目錄結(jié)構(gòu)
    svn://proj/
    +trunk/ (merge from branch dev_1.0)
    +branches/
    +dev_1.0 (開發(fā)任務(wù)結(jié)束,freeze)
    +tags/
  3. 根據(jù)trunk做1.0的tag
    此時的目錄結(jié)構(gòu)
    svn://proj/
    +trunk/ (merge from branch dev_1.0)
    +branches/
    +dev_1.0 (開發(fā)任務(wù)結(jié)束,freeze)
    +tags/
    +tag_release_1.0 (copy from trunk)
  4. 1.0開發(fā)挤聘,做dev2.0分支
    此時的目錄結(jié)構(gòu)
    svn://proj/
    +trunk/
    +branches/
    +dev_1.0 (開發(fā)任務(wù)結(jié)束轰枝,freeze)
    +dev_2.0 (進(jìn)行2.0開發(fā))
    +tags/
    +tag_release_1.0 (copy from trunk)
  5. 1.0有bug,直接在dev1.0的分支上修復(fù)
    此時的目錄結(jié)構(gòu)
    svn://proj/
    +trunk/
    +branches/
    +dev_1.0 (1.0bugfix)
    +dev_2.0 (進(jìn)行2.0開發(fā))
    +tags/
    +tag_release_1.0 (copy from trunk)
  6. 選擇性的進(jìn)行代碼merge

這其實是一種分散式的開發(fā)组去,當(dāng)各個部分相對獨立一些(功能性的)鞍陨,可以開多個dev的分支進(jìn)行開發(fā),這樣各人/組都不會相互影響从隆。比如dev_2.0_search和dev_2.0_cache等诚撵。但是這樣merge起來就是一個很痛苦的事情。
這里要注意一下的键闺,第六步進(jìn)行選擇性的merge寿烟,是可以當(dāng)2.0開發(fā)結(jié)束后一起把dev_1.0(bugfix用)和dev_2.0(新版本開發(fā)用)merge回trunk⌒猎铮或者先把dev_1.0 merge到dev_2.0筛武,進(jìn)行測試等之后再merge回trunk。
這兩種方法各有利弊挎塌,第一種方法是可以得到一個比較純的dev_2.0的開發(fā)分支徘六,而第二種方法則更加的保險,因為要測試嘛榴都。
以上呢待锈,就是我說的兩種開發(fā)模式了,具體哪種好嘴高,并沒有定論竿音。這里大致的說一下各自的優(yōu)缺點
第一種開發(fā)模式(trunk進(jìn)行主要開發(fā),集中式):
優(yōu)點:管理簡單
缺點:當(dāng)開發(fā)的模塊比較多阳惹,開發(fā)人數(shù)/小團隊比較多的時候谍失,很容易產(chǎn)生沖突而影響對方的開發(fā)眶俩。因為所有的改動都有可能觸碰對方的改動
第二種開發(fā)模式(分支進(jìn)行主要開發(fā)莹汤,分散式):
優(yōu)點:各自開發(fā)獨立,不容易相互影響颠印。
缺點:管理復(fù)雜纲岭,merge的時候很麻煩,容易死人

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末线罕,一起剝皮案震驚了整個濱河市止潮,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌钞楼,老刑警劉巖喇闸,帶你破解...
    沈念sama閱讀 219,270評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異,居然都是意外死亡燃乍,警方通過查閱死者的電腦和手機唆樊,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,489評論 3 395
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來刻蟹,“玉大人逗旁,你說我怎么就攤上這事∮弑瘢” “怎么了片效?”我有些...
    開封第一講書人閱讀 165,630評論 0 356
  • 文/不壞的土叔 我叫張陵,是天一觀的道長英古。 經(jīng)常有香客問我淀衣,道長,這世上最難降的妖魔是什么召调? 我笑而不...
    開封第一講書人閱讀 58,906評論 1 295
  • 正文 為了忘掉前任舌缤,我火速辦了婚禮,結(jié)果婚禮上某残,老公的妹妹穿的比我還像新娘国撵。我一直安慰自己,他們只是感情好玻墅,可當(dāng)我...
    茶點故事閱讀 67,928評論 6 392
  • 文/花漫 我一把揭開白布介牙。 她就那樣靜靜地躺著,像睡著了一般澳厢。 火紅的嫁衣襯著肌膚如雪环础。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,718評論 1 305
  • 那天剩拢,我揣著相機與錄音线得,去河邊找鬼。 笑死徐伐,一個胖子當(dāng)著我的面吹牛贯钩,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播办素,決...
    沈念sama閱讀 40,442評論 3 420
  • 文/蒼蘭香墨 我猛地睜開眼角雷,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了性穿?” 一聲冷哼從身側(cè)響起勺三,我...
    開封第一講書人閱讀 39,345評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎需曾,沒想到半個月后吗坚,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體祈远,經(jīng)...
    沈念sama閱讀 45,802評論 1 317
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,984評論 3 337
  • 正文 我和宋清朗相戀三年商源,在試婚紗的時候發(fā)現(xiàn)自己被綠了绊含。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 40,117評論 1 351
  • 序言:一個原本活蹦亂跳的男人離奇死亡炊汹,死狀恐怖躬充,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情讨便,我是刑警寧澤充甚,帶...
    沈念sama閱讀 35,810評論 5 346
  • 正文 年R本政府宣布,位于F島的核電站霸褒,受9級特大地震影響伴找,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜废菱,卻給世界環(huán)境...
    茶點故事閱讀 41,462評論 3 331
  • 文/蒙蒙 一技矮、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧殊轴,春花似錦衰倦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,011評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至孽文,卻和暖如春驻襟,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背芋哭。 一陣腳步聲響...
    開封第一講書人閱讀 33,139評論 1 272
  • 我被黑心中介騙來泰國打工沉衣, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人减牺。 一個月前我還...
    沈念sama閱讀 48,377評論 3 373
  • 正文 我出身青樓豌习,卻偏偏與公主長得像,于是被迫代替她去往敵國和親烹植。 傳聞我的和親對象是個殘疾皇子斑鸦,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 45,060評論 2 355

推薦閱讀更多精彩內(nèi)容