Code Monkey home page Code Monkey logo

rclonefilewatchercore's Introduction

RcloneFileWatcherCore 0.6

.NET Core 3.1

Main Features

  1. Monitor filesystem changes (file/directory level)
  2. Generate --include-from file for rclone
  3. Execute rclone batch. Rclone command must contain --include-from
  4. Synchronize changes in real time.

Installation

  1. Install and configure rclone
  2. Download source or binaries RcloneFileWatcherCore.

Setup and Usage

RcloneFileWatcherCoreConfig.cfg - JSON config file (example below).

  "ConsoleWriter": true,
  "Path": [
    {
      "WatchingPath": "e:\\Shared\\",
      "RcloneFilesFromPath": "d:\\files-from-shared.txt",
      "RcloneBatch": "d:\\rclone_livesync_shared.bat",
      "ExcludeContains": [
        ".tmp",
        ".drivedownload1"
      ]
    },
    {
      "WatchingPath": "d:\\test1\\",
      "RcloneFilesFromPath": "d:\\files-from-test1.txt",
      "RcloneBatch": "d:\\rclone_Test1.bat",
      "ExcludeContains": [
        ".tmp",
        ".drivedownload"
      ]
    }
   ],
    "UpdateRclone": {
      "Update": true,
      "RclonePath": ".\\rclone.exe",
      "RcloneWebsiteCurrentVersionAddress": "https://downloads.rclone.org/rclone-current-windows-amd64.zip",
      "ChceckUpdateHours": 1
  },
}
  • "ConsoleWriter": true - on or off display some debug information to console.

  • "WatchingPath": "e:\\Shared\\" - Watching folder

  • "RcloneFilesFromPath": "d:\\files-from-shared.txt" - output path to write --files-from (for rclone)

  • "RcloneBatch": "d:\\files-from-shared.txt" - run rclone script (batch) every 30 seconds only when appears any changes. Rclone script must contain --include-from

  • "ExcludeContains": [".tmp"] - exclude every path which contains ".tmp"

  • "UpdateRclone" - auto update rclone to latest stable version

  • "Update": true - enable auto update

  • "RclonePath": ".\\rclone.exe" - path to eclone

  • "RcloneWebsiteCurrentVersionAddress": "https://downloads.rclone.org/rclone-current-windows-amd64.zip" - current rclone version

  • "ChceckUpdateHours": 1 - check for update every numbers of hours

An example of a simple script - rclone_livesync_shared.bat:

rclone.exe sync --include-from d:\files-from-shared.txt e:\Shared pcloudcrypt:Shared --create-empty-src-dirs --backup-dir pcloudcrypt:$Archive\Shared\2021 --suffix " [backup]" --log-file=d:\log_livesync_shared.txt --log-level INFO

Windows users can run it as a service with NSSM - the Non-Sucking Service Manager.

A case of use

Run RcloneFileWatcherCore and leave it in background. Once per day (to be sure) run full rclone sync via scheduler/cron - it should pass without any changes.

rclonefilewatchercore's People

Contributors

mstarczewski avatar

Stargazers

YoungHyun Cho avatar  avatar FiDO avatar Dave Griffiths avatar Kostas Seresiotis avatar Simon Weiss avatar Allan Laal avatar Andrej Szontagh avatar

Watchers

 avatar

Forkers

ishfal

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.