Commit Graph
335 Commits
Author SHA1 Message Date
Kenneth SkovhedeandGitHub e614b08bb3 Merge pull request #5955 from duplicati/feature/alternate-source-provider
Alternate source provider
2025-02-28 10:07:53 +01:00
Kenneth Skovhede 11a27042bc Merge remote-tracking branch 'origin/master' into feature/alternate-source-provider 2025-02-26 19:25:46 +01:00
Kenneth Skovhede 0b61e0d0bc Yet another way to find out if the RID is for Windows 2025-02-25 15:14:37 +01:00
Kenneth Skovhede 3bfd12bf76 Fixed rid detection 2025-02-24 13:32:26 +01:00
Kenneth Skovhede 39ba3ab89e More exact rid match 2025-02-24 13:25:47 +01:00
Kenneth Skovhede ea07ac4288 Updated build logic to use target os 2025-02-24 13:24:58 +01:00
Kenneth Skovhede a9f328ae95 Add back missing Windows example script.
This adds back the missing `run-script-example.bat`.

It also makes the output conditional, so the Windows builds get the `.bat` and others get the `.sh` version.
2025-02-19 16:11:37 +01:00
Kenneth Skovhede cf5b4bb24d Added support for Wmic based Windows VSS snapshots.
Refactored code a bit to be easier to understand.
2025-02-19 14:00:14 +01:00
Kenneth Skovhede 6bbc93b8df Merge remote-tracking branch 'origin/master' into feature/alternate-source-provider 2025-02-16 16:37:12 +01:00
Kenneth Skovhede 439d10b53d Improve shell-script arguments 2025-02-12 09:23:07 +01:00
Kenneth SkovhedeandGitHub 5b66d06370 Merge pull request #5961 from duplicati/feature/do-not-escape-http-form-parameters
Do not encode http form extra parameters.
2025-02-11 09:26:07 +01:00
Kenneth Skovhede 3caaa78336 Merge remote-tracking branch 'origin/master' into feature/alternate-source-provider 2025-02-09 16:15:06 +01:00
Kenneth Skovhede 8c935a7344 This creates a new ISourceProvider interface for describing a data source.
With this interface it is possible to wrap the current support for snapshots and USN and simplify the enumeration.

This makes a number of assumptions into fields such as `IsMetaEntry` and `IsRootEntry` that removes code that was checking for various properties.

This first commit has support for VSS and USN as well as "naked" files, keeping feature parity.

There is also an experimental support for loading a backend-as-a-source. The support for this is currently limited as the backends need to be extended to support a folder concept.
2025-02-09 16:14:22 +01:00
Marcelo C. a203de90e1 Added support for Topic ID on Telegram
This adds support for TopicID as specified in parameter "send-telegram-topid-id" which allows the messages to be organized in topics on a group.

Finding out your topic ID in a group can be rather tricky the easiest way is to use curl to create it.

```bash
export CHAT_ID="-99999999"
export TOPIC_NAME="Your Topic"
export BOT_TOKEN="7777777777:AAAAAAAAA-4WwwwwwwwwwwwwwwwwwwwwwwQ"

curl -X POST \
    -H "Content-Type: application/json" \
    -d "{\"chat_id\":\"$CHAT_ID\",\"name\":\"$TOPIC_NAME\"}" \
    https://api.telegram.org/bot$BOT_TOKEN/createForumTopic
```
Which will response with a json where message_thread_id is the Topic ID
```bash
{"ok":true,"result":{"message_thread_id":33,"name":.....
```
2025-02-03 11:05:27 -03:00
Kenneth Skovhede 23e7233691 Do not encode http form extra parameters.
This changes the encoding that broke because the encoding function was changed.

The new logic is to not encode the parameters, but just use them as provided.

Any escaping needs to then be applied to the input by the user/caller.

This fixes #5900
2025-01-30 21:39:41 +01:00
Kenneth Skovhede fac12ba772 Further consolidated the data folder.
Added support for `--portable-mode` and `--server-datafolder` for the CLI, ServerUtil, and Agent.

Fixed a few places where file reads were not cached properly.

Moved some responsibilities of UpdaterManager into DataFolderManager.

This now supports storing `machineid.txt` and `installation.txt` inside the path pointed to by `--server-datafolder` or alternatively with `--portable-mode`.

It is possible that some fringe backwards compatibility is lost with this update.

Fixed an issue with AutoUpdater crashing on check/download.

This fixes #5902
2025-01-28 13:01:35 +01:00
Kenneth SkovhedeandGitHub 610f3b47d1 Update reporting module (#5910)
* Updated reporting values.

The reporter module can now emit the following extra values:
- operating-system
- installation-type
- destination-type
- next-scheduled-run

When running from the built-in scheduler, it will automatically set `--next-scheduled-run` so it is applied to the reporting data.

* Implemented an improved machine name reader.
This fixes #5907

* Added a guard against sending too much of the destination url as the destination.

* Fixed reading Windows Machine name

* Removed extra Windows logic as it has no effect
2025-01-28 08:56:42 +01:00
Kenneth SkovhedeandGitHub 997891525a Updated license-updater to update csproj files (#5898)
* Updated license-updater to update csproj files

* License updates
2025-01-22 21:04:19 +01:00
Kenneth SkovhedeandGitHub 6bbd64a655 Fixed nullability warnings in Utility.cs (#5861)
* Fixed nullability warnings in `Utility.cs`

* Fixed a number of nullability issues and warnings

* More nullable fixes

* Fixed the overwrite issue

* Fixed additional nullability issues

* Removed additional nullability issues

* More nullability fixes and added some xmldoc

* Added more xmldocs and removed an unused argument

* Removed more warnings
2025-01-14 14:03:48 +01:00
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Kenneth SkovhedeandGitHub ff1b2b7990 Simplified task control (#5753)
* Simplified task control by having all logic in a single class and using async control mechanism
* Fixed the tests
* Made the marking of a backup partial explicitly communicated if the enumeration process is stopped.
* Added support for pausing active transfers
* Introduced transfer token to abort operations.
* Updated the way LiveControl is emitting events.
* Retains the paused state of the server across reboots, this fixes #5760.
* Reworked the way throttle speeds are propagated through LiveControls.
* Added option to pause transfers in the UI.
* Removed throttle settings from the LiveControls class so it is exclusively handled by the ApplicationSettings.
* Removed `thread-priority` as it does not work at all when tasks are used.
* Fixed the stop dialog and API to only support stop and abort.
* Removed unused variables
2024-12-18 08:27:59 +01:00
Marcelo C. a3967527e8 Renaming the options to scope them down to the send-http module 2024-12-05 10:26:37 -03:00
Marcelo C. aa22766939 Adding support for self-signed or specific by hash certificates
This will add support for the parameters  accept-any-ssl-certificate and accept-specified-ssl-hash to the Http sender used in reporting.
2024-12-04 13:25:55 -03:00
Kenneth Skovhede ea2ba06ff6 Suppress HyperV warning option
This adds a new option to suppress the normal warning that is issues on client-version of Windows.

This fixes #5692
2024-11-25 21:25:02 +01:00
Kenneth SkovhedeandGitHub e9163e611a Merge pull request #5659 from marceloduplicati/feature/send-script-messages-tolog
Add feature to send messages to Log/Report from script
2024-11-09 07:47:12 +01:00
Marcelo Ceccon 671c88eeff Add feature to send messages to Log/Report from script
This works by parsing the stdout stream, line by line, looking for lines that start with the prefixes LOG:WARN, LOG:ERROR, LOG:INFO and forwarding them to the Log/Report.

In a script that could be used with a simple echo "LOG:WARN Some warning" or even if its an executable application, if it outputs to sdtout lines with the prefix, it will of course also be captured.
2024-11-08 10:49:58 +01:00
Marcelo Ceccon 28414dd744 Fix to telegram notification
Fixes the Telegram notification to use the correct API URL and to send the message in chunks if it is too long.

Will add this to the documentation.

First create your telegram bot by messaging the @BotFather

For more information https://core.telegram.org/bots

Once you have created your bot you will have a bot token.

Now on the bot channel, send one message, “Hello”. This is important because the bot cannot initiate a conversation, it can only respond, so therefore that is the only way to obtain the chatId which needs to be configured on Duplicati.

Now on a browser or curl, access:

https://api.telegram.org/botYOURBOTTOKEN/getUpdates

Look for the property

"chat":{"id”:111122233,

One way to get that with curl is:

BOT_TOKEN="YOURBOTTOKEN" curl -s "https://api.telegram.org/bot$BOT_TOKEN/getUpdates" | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2
2024-11-07 14:57:23 +01:00
Kenneth Skovhede bc7137d140 Disabled the Telegram notification destination as it is not currently working 2024-11-05 22:26:17 +01:00
Kenneth Skovhede f251d34b57 Implemented support for including the machine hostname in reports for simpler identification. 2024-10-16 16:22:47 +02:00
Kenneth Skovhede d46188427f Merge remote-tracking branch 'origin/master' into feature/remote-control-support 2024-10-02 14:53:00 +02:00
Kenneth Skovhede f49359eaf3 Removed use of Environment.OSVersion which is now deprecated.
Fallback to getting Windows version with `cmd /v ver`, which should be supported way back to DOS v6.
2024-09-18 16:02:01 +02:00
Kenneth Skovhede 8c0e4329f7 Fixed additional ReadOnly issues 2024-09-18 11:39:26 +02:00
Suguru Hirahara 6a703689a2 Replace 'channel id' with 'channel ID'
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2024-08-30 13:14:20 -04:00
Kenneth Skovhede 1e8bffbb67 Fixed an issue where the option value would be parsed case-sensitive.
This fixes #5500
2024-08-29 14:35:03 +02:00
87c6767f66 Update Duplicati/Library/Modules/Builtin/Strings.cs
Co-authored-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2024-08-15 15:05:09 +02:00
Kenneth Skovhede 1dc03ea0cf Add Telegram reporting module. 2024-08-15 13:12:34 +02:00
Kenneth SkovhedeandGitHub d60bbeb215 Merge pull request #5428 from luixxiul/Strings.cs
Remove conjugation from Strings.cs files
2024-08-14 21:27:25 +02:00
Suguru Hirahara b05c8f30ad Update FailedToLookupMXServer 2024-08-14 05:29:06 -04:00
Suguru Hirahara 0a9425b944 Remove remaining conjugation 2024-08-13 10:16:20 -04:00
Suguru Hirahara a6b8f61646 Remove conjugation more 2024-08-13 08:09:04 -04:00
Suguru Hirahara 42e898d6c7 Remove conjugation - Builtin/Strings.cs 2024-08-13 08:08:54 -04:00
Suguru Hirahara 14a2114c71 Remove conjugation 2024-08-13 08:07:10 -04:00
Suguru Hirahara ac499e666d Add 'Use this option to set' to SendhttpurlsformLong 2024-08-06 11:58:18 -04:00
Suguru Hirahara 630468f785 Replace "property" with "option" 2024-08-06 11:56:17 -04:00
Suguru Hirahara 0d348a4615 Add 'Use this option to ...' to strings 2024-08-05 09:12:12 -04:00
Suguru Hirahara c122245a50 Update a string on Builtin/Strings.cs 2024-07-31 05:15:12 -04:00
Suguru Hirahara 534c8e0d5d Fix strings on Builtin/Strings.cs 2024-07-31 01:53:21 -04:00
Suguru Hirahara f48fac6a02 Change 'i.e.' to 'e.g.' where an example is indicated 2024-07-30 01:01:20 -04:00
Suguru Hirahara dc67fb300a Change 'url' to 'URL' 2024-07-30 00:55:48 -04:00
Suguru Hirahara fba20d6b60 Fix SendxmpptoLong on Builtin/Strings.cs 2024-07-30 00:29:09 -04:00