Manage server logs (log files) for a PostgreSQL flexible server.
Commands az postgres flexible-server server-logs downloadDownload log files for a PostgreSQL flexible server.
az postgres flexible-server server-logs download --name
[--ids]
[--resource-group]
[--server-name]
[--subscription]
Examples
Downloads log files f1 and f2 to the current directory from the server 'testsvr'. Please note that f1 and f2 should match the log file name including the foldername, for instance serverlogs/f1.log
az postgres flexible-server server-logs download -g testgroup -s testsvr -n serverlogs/f1.log serverlogs/f2.log
Required Parameters
Space-separated list of log filenames on the server to download.
Optional ParametersThe following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property Value Parameter group: Resource Id ArgumentsName of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Property Value Parameter group: Resource Id ArgumentsName or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property Value Default value: False az postgres flexible-server server-logs listList log files for a PostgreSQL flexible server.
az postgres flexible-server server-logs list [--file-last-written]
[--filename-contains]
[--ids]
[--max-file-size]
[--resource-group]
[--server-name]
[--subscription]
Examples
List log files for 'testsvr' modified in the last 72 hours (default value).
az postgres flexible-server server-logs list -g testgroup -s testsvr
List log files for 'testsvr' modified in the last 10 hours.
az postgres flexible-server server-logs list -g testgroup -s testsvr --file-last-written 10
List log files for 'testsvr' less than 30Kb in size.
az postgres flexible-server server-logs list -g testgroup -s testsvr --max-file-size 30
List log files for 'testsvr' containing name 'serverlogs'.
az postgres flexible-server server-logs list -g testgroup -s testsvr --subscription testSubscription --filename-contains serverlogs
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Integer in hours to indicate file last modify time.
Property Value Default value: 72The pattern that file name should match.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property Value Parameter group: Resource Id ArgumentsThe file size limitation to filter files.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Property Value Parameter group: Resource Id ArgumentsName or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Property Value Default value: FalseShow this help message and exit.
Only show errors, suppressing warnings.
Property Value Default value: FalseOutput format.
Property Value Default value: json Accepted values: json, jsonc, none, table, tsv, yaml, yamlcJMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property Value Default value: FalseRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4