annotate software/growiBackup.md @ 134:e965a4b3e697 default tip

backup 2023-11-14
author autobackup
date Tue, 14 Nov 2023 00:10:04 +0900
parents 448be53c51da
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
1 # growiBackup
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
2
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
3 # cliのリポジトリ
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
4
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
5 - [Members/anatofuz/growiBackup](http://www.cr.ie.u-ryukyu.ac.jp/hg/Members/anatofuz/growiBackup/)
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
6
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
7 # backupリポジトリ
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
8
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
9 - [Document/Growi](http://www.cr.ie.u-ryukyu.ac.jp/hg/Document/Growi/)
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
10
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
11 # cliの使い方
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
12
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
13
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
14 ```shell
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
15 $./growibackup ${revison.json} ${backup_dir}
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
16 ```
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
17
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
18
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
19 エントリの内容はrevison.jsonに書かれているので、それを指定します。 docker-composeで動かしている場合は、こんな感じのシェルスクリプト化すると楽です。(`run.sh`)
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
20
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
21 ```shell
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
22 DAY=`date "+%Y-%m-%d"`
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
23 REVJSON=revision_back_${DAY}.json
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
24 docker exec growi_mongo_1 mongoexport -d growi -c revisions --pretty --jsonArray --out ${REVJSON}
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
25 docker cp growi_mongo_1:${REVJSON} .
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
26 docker exec growi_mongo_1 rm ${REVJSON}
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
27 ./growibackup ${REVJSON} Growi
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
28 ```
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
29
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
30 # 参考
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
31
448be53c51da backup 2020-12-18
autobackup
parents:
diff changeset
32 - [Growiのバックアップツールをgolangで書き直した](https://anatofuz.hatenablog.com/entry/2020/12/16/160344)