Commit Graph

372 Commits

Author SHA1 Message Date
Daniel Poelzleithner
a4556b835f Fix spacing/wording 2023-03-02 17:22:01 +01:00
Daniel Poelzleithner
e831ad6945 check alarm for type first. fixes #679 2022-11-11 20:05:09 +01:00
Daniel Poelzleithner
945b57d8fb Add Cron test 2022-11-11 15:11:09 +01:00
Daniel Poelzleithner
787b2b0015 fix static code analysis warnings, typos 2022-11-10 04:21:17 +01:00
Daniel Poelzleithner
e09b58b721 Fix wrong arguments for Sync:appendFilter proxy function 2022-11-09 22:44:04 +01:00
Daniel Poelzleithner
9b81bb1785 fix dump for more complex structures 2022-11-09 22:41:04 +01:00
Daniel Poelzleithner
cda98d6ba9 add Queue.inject, test Queue, bugfixes in remove() 2022-11-09 15:22:58 +01:00
Daniel Poelzleithner
a2f7df504c bump version 2022-10-28 15:12:41 +02:00
Daniel Poelzleithner
e08685cfd6 Search crontab library with different names 2022-10-28 14:08:00 +02:00
Daniel Poelzleithner
1eb8a83500 Print version in debug and help messages 2022-10-28 14:07:17 +02:00
Daniel Poelzleithner
f02bf700c1 bump version to 2.3.0 2022-06-07 23:26:04 +02:00
Daniel Poelzleithner
82f9f27172 Add proper compatibilty wrappers for 5.1 2022-06-07 22:28:30 +02:00
Daniel Poelzleithner
8c71941f9c Remove old debug prints, fix error() calls 2022-06-03 06:45:38 +02:00
Daniel Poelzleithner
f244405bce Use ^ instead of ${} syntax in commandSubstitution as well 2022-06-03 06:45:38 +02:00
Daniel Poelzleithner
5b8fa2deda don't export splitQuotedString 2022-06-03 06:45:38 +02:00
Daniel Poelzleithner
f2272f1aa7 Support tunnel command as string 2022-06-03 06:45:38 +02:00
Daniel Poelzleithner
867a3cec8e Add debug function 2022-06-03 06:45:38 +02:00
Daniel Poelzleithner
a16d714d6e fix alarm calculation 2022-06-03 06:45:38 +02:00
Daniel Poelzleithner
1b7bf7577f do not export inhert functions 2022-06-03 06:45:38 +02:00
Daniel Poelzleithner
075d64a069 Implement batchSizeLimit for rsync based transfers
If the batchSizeLimit is set, only files lower then this limit will
be grouped in one rsync transfer.
Each file larger then this limit will spawn their own transfer process.
This will cause large files to no longer block small file transfers under the
circumstance the maxProcess limit on the sync is larger then 1

A very optimized, very secure transfer configuration based on a
pool of ssh connection looks like this:

```
sync {
        default.rsync,
        tunnel = tunnel {
            command = {"ssh", "-N", "-L", "localhost:${localport}:localhost:873", "user@targetmachine"},
            mode = "pool",
            parallel = 2,
        },
        source = "/tmp/src",
        target    = "rsync://localhost:${localport}/test",
        delay = 5,
        batchSizeLimit = 1024 * 1024 * 30,
        maxProcesses = 4,
        rsync = {
                verbose = true,
                inplace = true,
        }
}
```

If you configure remote ssh configuration only allows portforwarding and your rsync daemon
is configured correctly, you can very securely transfer data without giving shell access.
2022-06-03 06:45:38 +02:00
Daniel Poelzleithner
4a0896f58f fix logic error in alarm compare 2022-06-03 06:45:38 +02:00
Daniel Poelzleithner
6d9164a29a Fix wrong alarm selection 2022-06-03 06:45:38 +02:00
Daniel Poelzleithner
ff84a35d4d Finish full sync cron trigger 2022-06-03 06:45:38 +02:00
Daniel Poelzleithner
9ec4f42888 Only check Tunnels if there is at least one tunnel defined 2022-06-03 06:45:38 +02:00
Daniel Poelzleithner
95f8ea67dd Log source of next alarm as well 2022-06-03 06:45:38 +02:00
Daniel Poelzleithner
c8fbe955fe Add debug functions and timestamp2string helpers 2022-06-03 06:45:38 +02:00
Daniel Poelzleithner
58f1991e0b [WIP] implement crontab full sync 2022-06-03 06:45:38 +02:00
Daniel Poelzleithner
46188f9f60 Implement tunnel pool mode.
In this mode, multiple tunnel processes are started and connection a load
balanced on the pool of connections.

Example config:

...
sync {
  default.rsync,
  tunnel = tunnel {
    command = {"ssh", "-N", "-L", "localhost:${localport}:localhost:873", "user@testmachine"},
    mode = "pool",
    parallel = 2,
  },
  target    = "rsync://localhost:${localport}/test",
  ...
}
2022-06-03 06:44:02 +02:00
Daniel Poelzleithner
6e60f6b89e Call runner cleanup method when exiting through error codes 2022-06-03 06:44:02 +02:00
Daniel Poelzleithner
2b9de7d4c3 rename traceback function 2022-06-03 06:44:02 +02:00
Daniel Poelzleithner
fb86124f30 Call user provideable check function 2022-06-03 06:44:01 +02:00
Daniel Poelzleithner
f66b7147fd Report tunnel status in status file 2022-06-03 06:44:01 +02:00
Daniel Poelzleithner
c543a21162 Add function to substitude commands with placeholders 2022-06-03 06:44:01 +02:00
Daniel Poelzleithner
3d2288dccf Updates to tunnel logic.
Delay before tunnel is considered up.
Working delay if restart fails.
Disabled state.
Kill all tunnel processes on graceful exit
2022-06-03 06:44:01 +02:00
Daniel Poelzleithner
f603d41c6c bump version 2022-06-03 06:44:01 +02:00
Daniel Poelzleithner
274b2b0416 [WIP] Add tunnel support 2022-06-03 06:44:01 +02:00
Daniel Poelzleithner
e2a27af6e7 use relative sh path 2022-01-12 20:46:41 +01:00
Daniel Poelzleithner
39f2f3a373 Finish -onepass option to exit when all syncs ran sucessfully once 2021-12-10 15:05:30 +01:00
Daniel Poelzleithner
d737c03c03 Merge remote-tracking branch 'origin/pr/541' 2021-12-10 12:51:01 +01:00
Daniel Poelzleithner
3e8aad3b2e Use sshopts for rsyncssh tests 2021-12-08 18:26:11 +01:00
Daniel Poelzleithner
5b0d266669 add cmd option to pass ssh options 2021-12-08 18:24:13 +01:00
Bernard Gray
a57b80f9c8 make indenting consistent 2018-12-06 08:41:53 +11:00
Bernard Gray
188b691bea add onepass option to exit after initial sync 2018-12-05 17:05:18 +11:00
Axel Kittenberger
99b6b18ac2 fixing loadstring() Lua5.3 issue 2018-03-09 10:42:10 +01:00
Axel Kittenberger
4bc456b544 preparing 2.2.3 2018-03-09 10:13:29 +01:00
Axel Kittenberger
faa582e259 cleanups 2018-03-01 15:19:30 +01:00
Axel Kittenberger
ba52ee1a6f cleanups 2018-03-01 15:08:26 +01:00
Axel Kittenberger
a78f239fa2 apply filters before inotify watching dirs, actually filter events 2018-03-01 14:14:28 +01:00
Axel Kittenberger
465e173983 cleanups 2018-03-01 11:26:12 +01:00
Axel Kittenberger
1e0d867f80 adding inclusion filters 2018-02-27 17:14:36 +01:00