
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Rsync-Dir is program (available for Windows and Linux) designed to replicate a specified directory to a data store:
Amazon S3. This can be either the AWS (Amazon)
S3 cloud service or a Minio S3 server instance (local or cloud),Only files available in the main directory or the entire tree can be replicated. This is determined by recursive parameter. The application also allows you to specify which types of files are subject to replication and which of them are to be ignored. There are also two replication modes available:
In order to improve the efficiency of sending a file to the data store, the program has implemented a mechanism for dividing files into smaller fragments (called chunks), for which checksums are calculated, thanks to which only those fragments of the file that have changed are sent to the store, not entire files. In the case of deleting a file from a directory, this file can be deleted from the data store, when the assu***ion is to reflect the state of the monitored directory in the data store. This is decided by the delete action in the actions parameter. The program also supports changing the file name.
The program has implemented several available actions taken by the application:
start – basic action to start monitoring the specified directory – activating instant replication, in which the file is sent to the data store immediately after detecting a change,
mtime – activating cyclic replication – changes in files are detected cyclically,
restore – restoring the state of the directory based on the data store. This action can be standalone and can be the only action taken by the application. It can be used to periodically restore the state of the directory on another server/node/pod,
delete – deleting all files from the datastore. This action can be standalone and may be the only action taken by the application. It can be used to reset the datastore from previously saved data.
The restore and delete actions can be com***ed with the start and mtime actions. Then the order of execution of the actions is as follows:
!image
You can run the default rsync-dir command simply (synchronization with Amazon S3):
docker run -itd --name rsync-dir \ --env ENV_RSYNCDIR_BUCKET_S3="AWS_BUCKET_S3" \ --env ENV_RSYNCDIR_ACCESS_KEY_S3="AWS_ACCESS_KEY_S3" \ --env ENV_RSYNCDIR_SECRET_KEY_S3="AWS_SECRET_KEY_S3" \ --env ENV_RSYNCDIR_LICENSE="LICENSE_STRING" \ gemail/rsync-dir:latest
If the variables indicated above are specified correctly, the correctness of the connection to S3 can be checked with the command:
docker logs rsync-dir
Correct startup looks like this:
Starting Rsync-Dir... Rsync-DIR v. 1.78 - dir replicator EoL:20251230 2025-06-27 10:33:08 - Rsync-DIR START 2025-06-27 10:33:08 - Action: RESTORE START 2025-06-27 10:33:08 - Connected to MINIO[s3.amazonaws.com:443] 2025-06-27 10:33:09 - File:/usr/rsync-dir/data/test.txt checked 2025-06-27 10:33:09 - File:/usr/rsync-dir/data/test.txt read chunk nr: 0 2025-06-27 10:33:09 - File:/usr/rsync-dir/data/test.txt identical - not restored 2025-06-27 10:33:09 - Action: RESTORE STOP 2025-06-27 10:33:09 - Action: DELETE START 2025-06-27 10:33:09 - Connected to MINIO[s3.amazonaws.com:443] 2025-06-27 10:33:10 - File:rsync-base/test.txt deleted from MINIO 2025-06-27 10:33:10 - Action: DELETE STOP 2025-06-27 10:33:10 - Action: START START
The most common problem is providing an incorrect license, which is indicated as follows:
Starting Rsync-Dir... Rsync-DIR v. 1.78 - dir replicator Error: License not valid or not correct /usr/rsync-dir
You may also experience authentication issues on the Amazon S3 side if you provide incorrect values for:
Starting Rsync-Dir... Rsync-DIR v. 1.78 - dir replicator EoL:20251230 2025-06-27 11:00:22 - Rsync-DIR START 2025-06-27 11:00:22 - Action: RESTORE START 2025-06-27 11:00:22 - Connected to MINIO[s3.amazonaws.com:443] 2025-06-27 11:00:22 - S3 operation failed; code: SignatureDoesNotMatch, message: The request signature we calculated does not match the signature you provided. Check your key and signing method.(...) 2025-06-27 11:00:22 - Action: RESTORE STOP
To verify operation, you can log in to the container:
docker exec -it rsync-dir bash
and change file test.txt in directory /usr/rsync-dir/data (default monitored directory).
After that check log:
docker logs rsync-dir
or log in to Amazon S3 console and check bucket indicated in the variable ENV_RSYNCDIR_BUCKET_S3.
List only for default configuration:
In Kubernetes clusters without persistent volumes support - as we know, pods are ephemeral and all data saved by the application on disk is lost in the event of a pod failure. If we want the application to have access to previously created files after a failure, we can use rsync-dir, which will continuously replicate files generated by the application to the selected data store. After a pod failure, by using e.g. an initialization container, we can restore previously replicated files to the state before the failure, and after restoring the files, run the basic container with the appropriate application and with access to previously created files
Based on documentation of rync-dir (you will receive it after purchasing the license) you need to prepare your own configuration file and create configmap:
kubectl create configmap rsync-dir-cm \ --from-file=my-rsync-dir.ini \ --from-literal=ENV_RSYNCDIR_CFG_INI=/config/my-rsync-dir.ini
spec: containers: - name: rsync-dir image: docker.io/gemail/rsync-dir:latest env: - name: ENV_RSYNCDIR_CFG_INI valueFrom: configMapKeyRef: name: rsync-dir-cm key: ENV_RSYNCDIR_CFG_INI volumeMounts: - name: config mountPath: /config volumes: - name: config configMap: name: rsync-dir-cm
The rsync-dir program can be used in many ways. Here are some examples of its use.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务