From 2bf8e1c7f60d7a7aa9e1364d95f4481f5990b3d2 Mon Sep 17 00:00:00 2001 From: ttionya Date: Sat, 10 Apr 2021 19:44:28 +0800 Subject: [PATCH] docs: optimize documents --- README.md | 69 ++++++++++++++++++++++++++++++++-------------------- README_zh.md | 67 +++++++++++++++++++++++++++++++------------------- 2 files changed, 85 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index 1a80d08..d0e4a5e 100644 --- a/README.md +++ b/README.md @@ -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. +
+You have the compressed file named backup ##### --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. +
+ +
+You have multiple independent backup files + +##### --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. + +
+ ## Environment Variables @@ -276,30 +286,37 @@ When using `Docker Compose`, you don't need to change it, but when using automat Default: `/bitwarden/data` +
+Other environment variables + +> **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` +
+ ## Use `.env` file diff --git a/README_zh.md b/README_zh.md index 76f30d6..d894485 100644 --- a/README_zh.md +++ b/README_zh.md @@ -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` 文件。 +
+你有一个名为 backup 的压缩文件 ##### --zip-file -如果你在备份文件时将 `ZIP_ENABLE` 环境变量设置为 `TRUE`,则需要使用这个选项来指定 `backup.zip` 文件。 +你需要使用这个选项来指定 `backup` 压缩文件。 请确保压缩文件中的文件名没有被更改。 @@ -153,10 +136,37 @@ docker run --rm -it \ **这是不安全的!!** -如果 `backup.zip` 文件设置了密码,你可以用这个选项指定备份文件的密码。 +如果 `backup` 压缩文件设置了密码,你可以用这个选项指定备份文件的密码。 不建议使用该选项,因为在没有使用该选项且存在密码时,程序会交互式地询问密码。 +
+ +
+你有多个独立的备份文件 + +##### --db-file + +你需要用这个选项来指定 `db.sqlite3` 文件。 + +##### --config-file + +你需要用这个选项来指定 `config.json` 文件。 + +##### --rsakey-file + +你需要用这个选项来指定 `rsakey.tar` 文件。 + +##### --attachments-file + +你需要用这个选项来指定 `attachments.tar` 文件。 + +##### --sends-file + +你需要用这个选项来指定 `sends.tar` 文件。 + +
+ ## 环境变量 @@ -277,30 +287,37 @@ Rclone 远程名称,你可以自己修改命名。 默认值:`/bitwarden/data` +
+其他环境变量 + +> **你无需修改这些环境变量,除非你知道你在做什么。** + #### 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` +
+ ## Use `.env` file