Giter Site home page Giter Site logo

alist-sync's Introduction

alist-sync

Alist 同步工具

终极目标:利用GitHub Actions实现使用Github的计算和网络资源定期同步各个网盘之间的数据。

本地运行

  1. 克隆并cd到存储库: git clone https://github.com/lee-cq/alist-sync.git && cd alist-sync
  2. 创建配置文件配置模版cp config-template.yaml config.yaml
  3. 配置AList服务端(可以是远程的)
  4. Linux: ./bootstrap.sh main sync Windows: python -m alist_aync sync

Actions 运行

  1. FORK存储库

  2. 创建SYNC_CONFIG文件,内容参见:config-template.yaml

  3. 创建存储库机密(Action):

    1. ALIST_BACKUP: 可选 [JSON] 现有ALIST网页端导出的备份配置, 用于初始化Alist
    2. ALIST_BACKUP_URL: 可选 [URL] 可以从远程导出BACKUP的URL, 与ALIST_BACKUP二选一
    3. ALIST_BACKUP_USERNAME: 可选 [string] 当ALIST_BACKUP存在时,需要提供用户名
    4. ALIST_BACKUP_PASSWORD: 可选 [string] 当ALIST_BACKUP存在时,需要提供密码
    5. ALIST_ADMIN_PASSWORD: 可选[string] 管理员密码,默认值: 123456
    6. SYNC_CONFIG: 必选[YAML|JSON] Alist-sync的配置
  4. 启用Action

预期同步模式:

1. copy 简单复制 (已实现)

工作原理:

将源目录中的文件分别同步到全部的目标目录中,

  1. 如果目标目录中已经存在该文件,则跳过
  2. 忽略存在与目标目录中但不存在于源目录中的文件

2. mirror 镜像复制 (待实现)

工作原理:

将源目录中的文件分别镜像同步到全部的目标目录中,

  1. 如果目标目录中已经存在该文件,则跳过
  2. 删除存在于目录目录但不存在于源目录中的文件

3. sync 多源双向复制(实现中)

工作原理:

-s 指定的目录分别作为源目录,想其他的目录中发起copy命令 将源目录中的文件分别镜像同步到全部的目标目录中,

  1. 如果目标目录中已经存在该文件,则跳过
  2. 删除存在于目录目录但不存在于源目录中的文件

4. sync-incr 多源增量复制(设计中)

工作原理:

-s 指定的目录分别作为源目录,想其他的目录中发起copy命令, 首次运行后会生成配置文件,持久化保存,作为增量的识别文件。

在每一个需要同步的目录创建.alist-sync-data(它不会被扫描器识别)

.alist-sync-data/
    scanner/
        time.time.json
    sync-lockor.json
history/
    file_path_MD5.history
    file_path_MD5.history.json
    ...

alist-sync's People

Contributors

lee-cq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

alist-sync's Issues

老哥好,想问一下使用方法

目前咱们前两种是怎么使用呢?
我现在是使用本地rclone同步的,上传的带宽,太感人了。不知道老哥调用actions上传的带宽怎么样?

本地运行,执行完成后,文件没有copy

2024-04-07 18:34:28,740 - alist-sync.worker - INFO - Worker[541c21ba12e0cb9f9ac3a4c306e842f46aa00e11] added to ThreadPool.
2024-04-07 18:34:28,741 - alist-sync.worker - INFO - worker[541c21ba] 已经开始工作.
2024-04-07 18:34:28,741 - alist-sync.config - INFO - Contenting MongoDB ...
2024-04-07 18:34:28,741 - alist-sync.worker - INFO - Worker[c363792eb33932e35933102fd4e9deb471c40238] added to ThreadPool.
2024-04-07 18:34:28,741 - alist-sync.worker - INFO - worker[c363792e] 已经开始工作.
2024-04-07 18:34:28,742 - alist-sync.config - INFO - Contenting MongoDB ...
2024-04-07 18:34:28,742 - alist-sync.worker - INFO - Worker[8745aeddf490993beb66d84f80644cd5c9ff9d45] added to ThreadPool.
2024-04-07 18:34:28,742 - alist-sync.worker - INFO - worker[8745aedd] 已经开始工作.
2024-04-07 18:34:28,743 - alist-sync.config - INFO - Contenting MongoDB ...
2024-04-07 18:34:28,743 - alist-sync.worker - INFO - Worker[9ed1fc850961b000368d51916913d3e86e6abec9] added to ThreadPool.
2024-04-07 18:34:28,743 - alist-sync.worker - INFO - worker[9ed1fc85] 已经开始工作.
2024-04-07 18:34:28,744 - alist-sync.config - INFO - Contenting MongoDB ...
2024-04-07 18:34:28,744 - alist-sync.worker - INFO - Worker[01a467118e93c2297087f6b3703f51c716d590f9] added to ThreadPool.
2024-04-07 18:34:28,744 - alist-sync.worker - INFO - worker[01a46711] 已经开始工作.
2024-04-07 18:34:28,745 - alist-sync.worker - INFO - Worker[6bae00949aff2e2dc887927d162ab17ab21e80dd] added to ThreadPool.
2024-04-07 18:34:28,745 - alist-sync.config - INFO - Contenting MongoDB ...
2024-04-07 18:34:28,745 - alist-sync.worker - INFO - worker[6bae0094] 已经开始工作.
2024-04-07 18:34:28,746 - alist-sync.worker - INFO - worker[db0bbe5d] 已经开始工作.
2024-04-07 18:34:28,746 - alist-sync.config - INFO - Contenting MongoDB ...
2024-04-07 18:34:28,746 - alist-sync.worker - INFO - Worker[db0bbe5da5dba8d9af65885e77918fcb77b749ce] added to ThreadPool.
2024-04-07 18:34:28,747 - alist-sync.config - INFO - Contenting MongoDB ...
2024-04-07 18:34:28,748 - alist-sync.config - INFO - Contenting MongoDB ...
2024-04-07 18:34:31,716 - alist-sync.d_checker - DEBUG - Checker Size: sync1, 0
2024-04-07 18:34:34,717 - alist-sync.d_checker - DEBUG - Checker Size: sync1, 0
2024-04-07 18:34:37,718 - alist-sync.d_checker - DEBUG - Checker Size: sync1, 0
2024-04-07 18:34:40,719 - alist-sync.d_checker - DEBUG - Checker Size: sync1, 0
2024-04-07 18:34:40,719 - alist-sync.d_checker - INFO - 循环线程退出 - checker_main[sync1-CheckerCopy]
2024-04-07 18:34:40,748 - alist-sync.worker - INFO - 等待Worker执行完成, 排队中的数量: 0
2024-04-07 18:34:40,749 - alist-sync.worker - INFO - 循环线程退出 - workers_main
大佬,看下什么问题

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.