mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-08-06 02:02:16 +00:00
close #3777: Add source information to backup logs
This will show the ip-address of the client creating the backup in the logs. For example it will output: "starting new backup on datastore 'test1' from ::ffff:192.168.1.192: "host/test/2023-08-21T07:28:10Z"". Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
This commit is contained in:
parent
8fcd709cf2
commit
2aae8544b7
@ -214,9 +214,12 @@ fn upgrade_to_backup_protocol(
|
||||
env.debug = debug;
|
||||
env.last_backup = last_backup;
|
||||
|
||||
let origin = match rpcenv.get_client_ip().map(|addr| addr.ip()) {
|
||||
Some(ip) => format!(" from {ip}"),
|
||||
None => "".into(),
|
||||
};
|
||||
env.log(format!(
|
||||
"starting new {} on datastore '{}': {:?}",
|
||||
worker_type, store, path
|
||||
"starting new {worker_type} on datastore '{store}'{origin}: {path:?}",
|
||||
));
|
||||
|
||||
let service =
|
||||
|
Loading…
Reference in New Issue
Block a user