docs: optimize documents

This commit is contained in:
ttionya
2021-04-10 19:44:28 +08:00
parent 3b10c6d0b0
commit 2bf8e1c7f6
2 changed files with 85 additions and 51 deletions
+43 -26
View File
@@ -121,40 +121,50 @@ See [Options](#options) for options information.
#### Options
##### --db-file
If you didn't set the `ZIP_ENABLE` environment variable to `TRUE` when you backed up the file, you need to use this option to specify the `db.sqlite3` file.
##### --config-file
If you didn't set the `ZIP_ENABLE` environment variable to `TRUE` when you backed up the file, you need to use this option to specify the `config.json` file.
##### --rsakey-file
If you didn't set the `ZIP_ENABLE` environment variable to `TRUE` when you backed up the file, you need to use this option to specify the `rsakey.tar` file.
##### --attachments-file
If you didn't set the `ZIP_ENABLE` environment variable to `TRUE` when you backed up the file, you need to use this option to specify the `attachments.tar` file.
##### --sends-file
If you didn't set the `ZIP_ENABLE` environment variable to `TRUE` when you backed up the file, you need to use this option to specify the `sends.tar` file.
<details>
<summary>You have the compressed file named <code>backup</code></summary>
##### --zip-file
If you set the `ZIP_ENABLE` environment variable to `TRUE` when you backed up the file, you need to use this option to specify the `backup.zip` file.
You need to use this option to specify the `backup` compressed package.
Make sure the file name in the zip file has not been changed.
Make sure the file name in the compressed package has not been changed.
##### -p / --password
THIS IS INSECURE!
If the `backup.zip` file has a password, you can use this option to set the password to unzip it.
If the `backup` compressed package has a password, you can use this option to set the password to extract it.
If not, the password will be asked for interactively.
</details>
<details>
<summary>You have multiple independent backup files</summary>
##### --db-file
You need to use this option to specify the `db.sqlite3` file.
##### --config-file
You need to use this option to specify the `config.json` file.
##### --rsakey-file
You need to use this option to specify the `rsakey.tar` file.
##### --attachments-file
You need to use this option to specify the `attachments.tar` file.
##### --sends-file
You need to use this option to specify the `sends.tar` file.
</details>
## Environment Variables
@@ -276,30 +286,37 @@ When using `Docker Compose`, you don't need to change it, but when using automat
Default: `/bitwarden/data`
<details>
<summary>Other environment variables</summary>
> **You don't need to change these environment variables unless you know what you're doing.**
#### DATA_DB
Set the sqlite database file path, you do not need to modify it.
Set the sqlite database file path.
Default: `${DATA_DIR}/db.sqlite3`
#### DATA_RSAKEY
Set the rsa_key file path, you don't need to modify it.
Set the rsa_key file path.
Default: `${DATA_DIR}/rsa_key`
#### DATA_ATTACHMENTS
Set the attachment folder path, you don't need to modify it.
Set the attachment folder path.
Default: `${DATA_DIR}/attachments`
#### DATA_SENDS
Set the sends folder path, you don't need to modify it.
Set the sends folder path.
Default: `${DATA_DIR}/sends`
</details>
## Use `.env` file
+42 -25
View File
@@ -123,29 +123,12 @@ docker run --rm -it \
#### 选项
##### --db-file
如果你在备份文件时没有将 `ZIP_ENABLE` 环境变量设置为 `TRUE`,那你需要用这个选项来指定 `db.sqlite3` 文件。
##### --config-file
如果你在备份文件时没有将 `ZIP_ENABLE` 环境变量设置为 `TRUE`,那你需要用这个选项来指定 `config.json` 文件。
##### --rsakey-file
如果你在备份文件时没有将 `ZIP_ENABLE` 环境变量设置为 `TRUE`,那你需要用这个选项来指定 `rsakey.tar` 文件。
##### --attachments-file
如果你在备份文件时没有将 `ZIP_ENABLE` 环境变量设置为 `TRUE`,那你需要用这个选项来指定 `attachments.tar` 文件。
##### --sends-file
如果你在备份文件时没有将 `ZIP_ENABLE` 环境变量设置为 `TRUE`,那你需要用这个选项来指定 `sends.tar` 文件。
<details>
<summary>你有一个名为 <code>backup</code> 的压缩文件</summary>
##### --zip-file
如果你在备份文件时将 `ZIP_ENABLE` 环境变量设置为 `TRUE`,则需要使用这个选项来指定 `backup.zip` 文件。
需要使用这个选项来指定 `backup` 压缩文件。
请确保压缩文件中的文件名没有被更改。
@@ -153,10 +136,37 @@ docker run --rm -it \
**这是不安全的!!**
如果 `backup.zip` 文件设置了密码,你可以用这个选项指定备份文件的密码。
如果 `backup` 压缩文件设置了密码,你可以用这个选项指定备份文件的密码。
不建议使用该选项,因为在没有使用该选项且存在密码时,程序会交互式地询问密码。
</details>
<details>
<summary>你有多个独立的备份文件</summary>
##### --db-file
你需要用这个选项来指定 `db.sqlite3` 文件。
##### --config-file
你需要用这个选项来指定 `config.json` 文件。
##### --rsakey-file
你需要用这个选项来指定 `rsakey.tar` 文件。
##### --attachments-file
你需要用这个选项来指定 `attachments.tar` 文件。
##### --sends-file
你需要用这个选项来指定 `sends.tar` 文件。
</details>
## 环境变量
@@ -277,30 +287,37 @@ Rclone 远程名称,你可以自己修改命名。
默认值:`/bitwarden/data`
<details>
<summary>其他环境变量</summary>
> **你无需修改这些环境变量,除非你知道你在做什么。**
#### DATA_DB
指定 sqlite 数据库文件的路径,你不需要修改它
指定 sqlite 数据库文件的路径。
默认值:`${DATA_DIR}/db.sqlite3`
#### DATA_RSAKEY
指定 rsa_key 文件的路径,你不需要修改它
指定 rsa_key 文件的路径。
默认值:`${DATA_DIR}/rsa_key`
#### DATA_ATTACHMENTS
指定附件文件夹路径,你不需要修改它
指定 attachments 文件夹路径
默认值:`${DATA_DIR}/attachments`
#### DATA_SENDS
指定 sends 文件夹路径,你不需要修改它
指定 sends 文件夹路径。
默认值:`${DATA_DIR}/sends`
</details>
## Use `.env` file