Commit Graph
31 Commits
Author SHA1 Message Date
Kenneth Skovhede 178440f869 Fixed a number of warnings 2025-11-14 16:00:06 +01:00
David Kartchner 369a24d112 Made log validation message clearer 2025-11-07 16:02:40 -07:00
David Kartchner e4798dcf66 Added further parsing validation and error messages 2025-11-07 16:00:47 -07:00
David Kartchner 4832df5e15 removed error parsing and added log count validation 2025-11-07 09:55:00 -07:00
David Kartchner afe606edb7 Display status after running backup with ServerUtil 2025-11-07 09:54:29 -07:00
Kenneth SkovhedeandGitHub b732374d87 Merge pull request #6473 from duplicati/feature/improve-non-persisted-login
Implemented a nonce for refresh tokens
2025-08-08 13:09:04 +02:00
Kenneth Skovhede dc3b7fc56c Add detailed output to backup lists
This PR adds a `--detailed` flag to ServerUtil that reports additional data for each backup. The JSON output now also includes the schedule and any metadata.
2025-08-08 10:52:45 +02:00
Kenneth Skovhede 6b9788b239 Fixed issue with saving non-persistent tokens 2025-08-08 08:27:04 +02:00
Kenneth Skovhede e3f1aefec2 Implemented a nonce for refresh tokens
This adds a nonce to the refresh token such that each request to obtain a refresh token must now also provide a matching nonce.

When using non-persisted logins, the request to the server is the same, but the "remember me" flag toggles a shorter duration for the refresh token.

The FE can then store the nonce in either local storage for persisted logins or in session storage for non-persisted logins.

The default is currently to always issue refresh tokens with a nonce, but this can be toggled with the JWT configuration.

The ngax client does not have the non-persisted login so it stores the nonce in local storage, using a name that is compatible with ngclient so the user can swap between them without needing to re-login.

The server util was updated to also store the nonce.

This fixes #6451
2025-08-07 23:10:54 +02:00
Kenneth Skovhede fc478146f3 Update ServerUtil probing
This PR updates the probing logic to not try the database if a password is supplied on the commandline.

It also fixes a crash that could happen at an unwanted place, if the user does not have write access to the supplied data folder. After this, the application will still crash due to not having  a place to write information, but it does not crash in the preloader logic. This also prevents creating the folder while probing for the database.

This PR also fixes a case where the database could become encrypted, if the ServerUtil was providing an encryption key to an unencrypted database. Before this fix, the database would be encrypted with the key provided to ServerUtil, which would most likely cause the Server/TrayIcon to fail starting and perhaps crash.

This fixes #6377
2025-07-10 21:03:16 +02:00
Kenneth Skovhede 7fb4391d67 Changed logic for scheduling requested backups to follow queue order by default 2025-05-12 13:49:28 +02:00
Kenneth Skovhede c9f985ecdd Final removal of FIXMEGlobal 2025-05-05 16:13:46 +02:00
Marcelo C. bf22d7e178 Changed parameter from boolean to Enum for clarity of purpose 2025-04-02 10:15:21 -03:00
Marcelo C. 2da12c12bb Refactoring of how permissions are set whilst obtaining DataFolder
This addresses [Issue](https://github.com/duplicati/duplicati/issues/6114).

Whenever in non-write context, the permissions of the folder are not set.

Changing pattern from static constructor execution.
2025-04-01 15:21:40 -03:00
Marcelo C. d15e398e81 Added machine-readable output for serverutil commands
This comes from suggestion on issue https://github.com/duplicati/duplicati/issues/6056

The chosen argument was --json which produces a json that wraps the result with extended properties such as in example:

``
{
  "Timestamp": "2025-03-28T15:47:01.3368160-03:00",
  "UnixTimestamp": 1743187621,
  "Command": "import",
  "Success": true,
  "ExitCode": 0,
  "Messages": [
    "Importing backup configuration from ../2-firstbacku.json",
    "Connecting to http://127.0.0.1:8200/...",
    "No database found in../data/",
    "Imported \"firstbackup (5)\" with ID 8"
  ],
  "Exceptions": [],
  "Imported": {
    "Id": "8",
    "Name": "firstbackup (5)"
  }
}
``

The documentation will reflect all commands and schemas as this makes its way into Canary
2025-03-28 16:08:45 -03: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 e9aa8717fc Improve ServerUtil (#5860)
* Improve the ServerUtil

Added `status` command to show server state

* Added support for waiting on a backup after starting it
2025-01-09 14:48:00 +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 Skovhede feeda8d9dc Formatted the output for generating a forever token 2024-12-12 11:07:40 +01:00
Kenneth Skovhede 7d4f9ffab3 Implemented a forever-token feature 2024-12-12 08:59:59 +01:00
Kenneth SkovhedeandGitHub 58a5fc57f4 Implemented support for emitting intermediate certificates from pfx (#5739)
* Implemented support for emitting intermediate certificates from pfx files

* Added certificate check to crash earlier

* Fixed loading certificate on Windows
2024-12-05 10:34:10 +01:00
Kenneth Skovhede 3833f7abf5 Made the auto-cert detection disabled if the user supplied the cert hashes. 2024-10-31 12:04:24 +01:00
Kenneth Skovhede d9953852ad Fixed compile errors on Windows 2024-10-30 10:51:32 +01:00
Kenneth Skovhede ff25d91663 Simplified code a bit.
Added support for multiple cert-hashes.
Made `server-util` auto-detect hashes as well.
2024-10-29 14:38:23 +01:00
Kenneth Skovhede 1e6eea5758 Added command to export configurations from the server 2024-09-11 16:41:25 +02:00
Kenneth Skovhede 542a4d6e7c Added support for connecting to a server with a self-signed certificate.
This fixes #5534
2024-09-04 20:33:59 +02:00
Kenneth Skovhede e3a8f34a67 Fixed issue with not finding backup by name.
Improved error message if it can be extracted from the server response.
2024-09-03 22:02:51 +02:00
Kenneth Skovhede 5ac0abb60b Added a check that logs finding no database is the user has supplied a database folder 2024-09-03 14:58:16 +02:00
Kenneth Skovhede d8c8ce7988 Removed the use of DeviceId due to lack of sufficient key material.
Kept the infrastructure to allow re-introducing it later if a better source for a device key is found.
Added support for not having any valid settings encryption key.
Added warnings if the user is running without a settings encryption key.
Added additional checks during startup to help with troubleshooting and configuring a setup with a settings encryption key.
Docker builds will now warn if no encryption key is set.
This fixes #5518
2024-08-31 11:02:14 +02:00
Kenneth Skovhede 595ac3c7ee Refactored the code to use the same method for detecting an existing server database.
This prevents creating empty databases when probing for one.
2024-08-30 13:08:37 +02:00
Kenneth Skovhede 735b4020eb Implemented duplicati-server-util for sending various commands to a running server.
This tool replaces `ConfigurationImporter` and partially replaces `duplicati_client`.
This fixes #5474
2024-08-26 20:00:13 +02:00